Created
July 15, 2012 00:43
-
-
Save NuckChorris/3114132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Macros | |
| // @namespace nuck | |
| // @description Provides some sexy Macros for dAmn. | |
| // @include *.deviantart.com/chat/* | |
| // ==/UserScript== | |
| var contentEval = function(source) { | |
| if ('function' == typeof source) { | |
| source = '(' + source + ')();' | |
| } | |
| var script = document.createElement('script'); | |
| script.setAttribute("type", "application/javascript"); | |
| script.textContent = source; | |
| document.body.appendChild(script); | |
| document.body.removeChild(script); | |
| } | |
| contentEval(function(){ | |
| var macros = { | |
| 'emotetesting': 'If you want to test emotes or icons, please do it in #emotetesting. To join #emotetesting, type <code>/join #emotetesting</code> :)', | |
| 'tab': 'To complete a username easily and have them see it highlighted, type the first few letters and press the tab key on your keyboard. :thumb180066399:', | |
| 'english': 'Please note that #devart is an <b>English-speaking</b> chatroom only. :)', | |
| 'rules': 'Please read the <b><a href="http://help.deviantart.com/287/">Channel Rules</a></b> and <b><a href="http://about.deviantart.com/policy/etiquette/">Etiquette Policy</a></b> before continuing or participating in chat :)' | |
| } | |
| for (var cmd in macros) { | |
| if (macros.hasOwnProperty(cmd)) { | |
| (function (macro) { | |
| MiddleMan.Commands.bind(cmd, 1, function (args) { | |
| MiddleMan.dAmnSend.msg(false, args + ": " + macro); | |
| }); | |
| })(macros[cmd]); | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment