Created
March 27, 2013 17:25
-
-
Save lakario/5256279 to your computer and use it in GitHub Desktop.
Bypass http://plug.dj's rate limiting and spam filtering. Tsk on them for making them client-side!
This file contains 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 Override Plug.dj chat | |
// @version 0.1 | |
// @description Bypasses chat send filtering. | |
// @match *plug.dj/*/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
var unsafeWindow = window; | |
var fireLazers = function() { | |
if(window.navigator.vendor.match(/Google/)) { | |
var div = document.createElement("div"); | |
div.setAttribute("onclick", "return window;"); | |
unsafeWindow = div.onclick(); | |
} | |
unsafeWindow.Models.chat.sendChat = function (a) { | |
var that = unsafeWindow.Models.chat; | |
if (!that.chatCommand(a)) { | |
var type = a.indexOf("/em") == 0 || a.indexOf("/me ") == 0 ? 'emote' : 'message'; | |
var c = { | |
message: unsafeWindow.Utils.cleanTypedString(type == 'emote' ? a.substring(3) : a) | |
, type: type | |
, language: unsafeWindow.Models.user.data.language | |
, from: unsafeWindow.Models.user.data.username | |
, fromID: unsafeWindow.Models.user.data.id | |
} | |
unsafeWindow.socket.chat(a); | |
that.onChatReceived(c); | |
} | |
return true; | |
} | |
}; | |
setTimeout(function() { | |
console.log('Chat filter override initialized.'); | |
fireLazers(); | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment