Advertisement
Guest User

Fixed bluescript

a guest
May 22nd, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. javascript: (function(cmd, client) {
  2. var color = [], colors = {
  3. "pur blu": ["#7700FF", "#7711FF", "#71F", "#6622FF", "#63F", "#5533FF", "#54F", "#4444FF", "#45F", "#4466FF", "#37F", "#2288FF", "#19F", "#1199FF", "#00AAFF"],
  4. };
  5. client[" "] = client.submit;
  6. client.submit = function(text) {
  7. var out = "";
  8. text = text.replace('\n','\\n');
  9. if (text.charAt(0) != "/" && text.charAt(0) != ">") {
  10. text = text.match(/(#([0-9A-F]{3}){1,2}|\\.)*(.|$)/gi).map(function(string, index){
  11. var append = color[index] || "";
  12. if (append == "") {
  13. return string;
  14. }
  15. return append + string + "\0";
  16. }).join("")
  17. }
  18. client[" "](text);
  19. };
  20. cmd.g = {
  21. "params" : [ 'which$' ],
  22. "handler" : function(obj) {
  23. CLIENT.submit("/echo Your gradient is now "+ obj.which);
  24. color = colors[obj.which] || [];
  25. }
  26. }
  27. }(COMMANDS,CLIENT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement