Created
April 3, 2016 01:27
-
-
Save teknogeek/720811fa60239ec8c082f8694ff2eeec to your computer and use it in GitHub Desktop.
Robin Enhancement Suite, created by pta2002, upgraded by teknogeek
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 Robin Enhancement Suite | |
// @namespace com.pta2002.robines | |
// @description Enhances robin | |
// @include https://www.reddit.com/robin | |
// @include http://www.reddit.com/robin | |
// @include https://reddit.com/robin | |
// @include http://reddit.com/robin | |
// @include https://www.reddit.com/robin/ | |
// @include http://www.reddit.com/robin/ | |
// @include https://reddit.com/robin/ | |
// @include http://reddit.com/robin/ | |
// @version 1.3 | |
// @grant none | |
// ==/UserScript== | |
var l = document.createElement('script'); | |
l.src = "https://cdnjs.cloudflare.com/ajax/libs/jQuery-linkify/1.1.7/jquery.linkify.min.js"; | |
document.getElementsByTagName('body')[0].appendChild(l); | |
function sendMessage(message){ | |
$("#robinSendMessage > input[type='text']").val(message); | |
$("#robinSendMessage > input[type='submit']").click(); | |
} | |
username = $('.user a:first').text(); | |
$('#robinVoteWidget').prepend($('<div id="RESUserCount" class="robin-chat--vote" style="width: 100%;">').text("Current participants: ")); | |
settingsPage = $('<div class="robin-chat--sidebar" style="display:none;" id="RESSettings">'); | |
settingsWidget = $('<div class="robin-chat--sidebar-widget robin-chat--vote-widget" id="RESSettingsWidget">'); | |
settingsPage.append(settingsWidget); | |
openSettingsButton = $('<div id="RESOpenSettings" class="robin-chat--vote" style="cursor: pointer">').text('Open settings'); | |
closeSettingsButton = $('<div id="RESCloseSettings" class="robin-chat--vote" style="cursor: pointer">').text('Close settings'); | |
function openSettings() { | |
$('.robin-chat--sidebar').hide(); | |
$('#RESSettings').show(); | |
} | |
function closeSettings() { | |
$('.robin-chat--sidebar').show(); | |
$('#RESSettings').hide(); | |
} | |
openSettingsButton.on('click', openSettings); | |
closeSettingsButton.on('click', closeSettings); | |
settingsWidget.append(closeSettingsButton); | |
// SETTINGS SETUP | |
function saveSetting(setting) { | |
localStorage["res-settings"] = JSON.stringify(setting); | |
} | |
function loadSetting() { | |
var setting = localStorage["res-settings"]; | |
if (setting) { | |
setting = JSON.parse(setting); | |
} else { | |
setting = {}; | |
} | |
return setting; | |
} | |
var settings = loadSetting(); | |
function addBoolSetting(name, description, defaultSetting) { | |
defaultSetting = settings[name] || defaultSetting; | |
settingsWidget.append('<div class="robin-chat--sidebar-widget robin-chat--notification-widget"><label><input type="checkbox" name="setting-' + name + '">' + description + '</label></div>'); | |
$("input[name='setting-" + name + "']").on("click", function() { | |
settings[name] = !settings[name]; | |
saveSetting(settings); | |
}); | |
if (settings[name] !== undefined) { | |
$("input[name='setting-" + name + "']").prop("checked", settings[name]); | |
} else { | |
settings[name] = defaultSetting; | |
} | |
} | |
function addButtonSetting(description, action) { | |
button = $('<div class="robin-chat--sidebar-widget robin-chat--vote-widget">'); | |
button.append($('<div class="robin-chat--vote" style="width: 100%; cursor: pointer;">').text(description)); | |
button.on("click", action); | |
settingsWidget.append(button); | |
} | |
$('.robin-chat--sidebar').before(settingsPage); | |
$('#robinVoteWidget').append(openSettingsButton); | |
addBoolSetting("spamFilter", "Enable spam filter (refresh needed)", true); | |
setInterval(function(){ | |
$('.robin-message--message').linkify(); | |
$('.robin-message--message:contains(' + username + ')').parent().css({'background': '#9DF595', 'font-weight': 'bold'}) | |
var users = 0; | |
$.get("/robin/", function(a) { | |
var start = "{" + a.substring(a.indexOf("\"robin_user_list\": [")); | |
var end = start.substring(0, start.indexOf("}]") + 2) + "}"; | |
list = JSON.parse(end).robin_user_list; | |
var increaseCount = list.filter(function(voter) { | |
return voter.vote === "INCREASE"; | |
}).length; | |
var abandonCount = list.filter(function(voter) { | |
return voter.vote === "ABANDON"; | |
}).length; | |
var novoteCount = list.filter(function(voter) { | |
return voter.vote === "NOVOTE"; | |
}).length; | |
var continueCount = list.filter(function(voter) { | |
return voter.vote === "CONTINUE"; | |
}).length; | |
$('#robinVoteWidget .robin--vote-class--increase .robin-chat--vote-label').html('grow<br>(' + increaseCount + ')'); | |
$('#robinVoteWidget .robin--vote-class--abandon .robin-chat--vote-label').html('abandon<br>(' + abandonCount + ')'); | |
$('#robinVoteWidget .robin--vote-class--continue .robin-chat--vote-label').html('stay<br>(' + continueCount + ')'); | |
users = list.length; | |
$("#RESUserCount").text("Current participants: " + users); | |
}); | |
}, 100); | |
// SPAM BLOCKER | |
setTimeout(function(){ | |
if (loadSetting().spamFilter) { | |
var target = document.querySelector('#robinChatMessageList'); | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
var msg = $(mutation.addedNodes[0].lastElementChild).text(); | |
if(msg.includes(' ͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇') | |
||msg.includes('.͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇͇') | |
||msg.includes('Ỏ̷͖͈̞̩͎̻̫̫̜͉̠̫͕̭̭̫̫̹̗̹͈̼̠̖͍͚̥͈̮̼͕̠̤̯̻̥̬̗̼̳̤̳̬̪̹͚̞̼̠͕̼̠̦͚̫͔̯̹͉͉̘͎͕̼̣̝͙̱̟̹̩̟̳̦̭͉̮̖̭̣̣̞̙̗̜̺̭̻̥͚͙̝̦̲̱͉͖͉̰̦͎̫̣̼͎͍̠̮͓̹̹͉̤̰̗̙͕͇͔̱͕̭') | |
||msg.includes('Autovoter') | |
||msg.includes('[Robin-Grow]') | |
||msg.includes('voted to GROW') | |
||msg.includes('voted to STAY') | |
||msg.includes('voted to ABANDON') | |
||msg.includes('Voting will end soon') | |
||msg.includes(' ༽') | |
||msg.includes('THE RABBIT') | |
||msg.includes('╭∩╮') | |
||msg.includes('I voted automatically') | |
||msg.includes('I automatically voted') | |
||msg.includes('ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎') | |
||msg.includes('ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็') | |
||msg.includes('╠═══╣') | |
||msg.includes('༼') | |
||msg.includes('ᕙ༼=ݓ益ݓ=༽ᕗ') | |
||msg.includes('ʖ') | |
||msg.includes('░░▒▒▓▓██') | |
||msg.includes('▂▃▅▆▇█') | |
||msg.includes('ASCEND to Valhalla!') | |
||msg.includes('🅿🅰🆃🅷🅸🅽🅾🅶🅴🅲') | |
||msg.includes('<<<<<<') | |
||msg.includes('>>>>>>') | |
||msg.includes('O-oooooooooo') | |
||msg.includes('sexbots') | |
||msg.includes('NAGARK') | |
||msg.includes('materiamagica') | |
||msg.includes('[STATS]') | |
||msg.includes('CAW') | |
||msg.includes('G R O W T H') | |
||msg.includes('I AM SUPREME RULER OF THIS CHATROOM') | |
||msg.includes('LADDER') | |
||msg.includes('DOOT') | |
||msg.includes('G R O W E T H') | |
||msg.includes('====') | |
||msg.includes('- - - ') | |
||msg.includes('------>') | |
||msg.includes('▲') | |
||msg.includes('~~~~~~') | |
||msg.includes('B I L L . G A T E S . D O N A T E S . 1 . M I L L I O N . T O . C A N C E R . W H E N . Y O U . G R O W ') | |
||msg.includes('J U S T . P R E S S . G R O W') | |
||msg.includes('▶️') | |
||msg.includes( 'S T A Y . N O T . L E S T . Y E . B E . S T A Y E D') | |
||msg.includes(' █████████████') | |
||msg.includes('This spam blocker has blocked') | |
||msg.includes('ʕっ•ᴥ•ʔっ') | |
||msg.includes('+++++') | |
||msg.includes('######') | |
||msg.includes('G R O W . Y O U R . B O A T') | |
||msg.includes('ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็ด้้้้้็็็็็้้้้้็็็็็้้') | |
||msg.includes('nigger') | |
||msg.includes('THE RABBIT') | |
||msg.includes('-DEV') | |
||msg.includes(' ͇͇') | |
||msg.includes(' ͇') | |
||msg.includes('░') | |
||msg.includes('CAMPAIGN TO STAY') | |
||msg.includes('60s pong') | |
||msg.includes('PRAISE ROBIN, THE GREAT MERGE WILL BRING') | |
||msg.includes('🆃🅴🅳 🅲🆁🆄🆉 🅸🆂 🆃🅷🅴 🆉🅾🅳🅸🅰🅲 🅺🅸🅻🅻🅴🆁') | |
||msg.includes('STAY STAY STAY STAY') | |
||msg.includes('﷽﷽﷽') | |
||msg.includes('🐥 ITS TIME TO STAY 🐥') | |
||msg.includes('🅼🅾🅾🅽 🅷🅰🅼🆂🆃🅴🆁🆂') | |
||msg.includes('N I P P L E B U T T') | |
||msg.includes('﷽﷽﷽﷽') | |
||msg.includes('GROW ONCE MORE THEN STAY 🅸') | |
||msg.includes('GROWTH = SUICIDE') | |
||msg.includes('卐 MOOB HUNTERS') | |
||msg.includes('Welcome to RobinFacts™!') | |
||msg.includes('.͇͇͇͇͇͇͇') | |
||msg.includes('ค้้้้้้้้้้้้้้้้้้้') | |
||msg.includes('🅹🅾🅸🅽 🅼🅴 🅱🆁🅾🆃🅷🅴🆁🆂') | |
||msg.includes('POT OF GREED ALLOWS ME TO') | |
||msg.includes('STAY_STAY_STAY') | |
||msg.includes('T H I S . L A S T S . F O R . A . W E E K ') | |
||msg.includes('▆▅') | |
||msg.includes('🅼🅾🅾🅽') | |
||msg.includes('╗') | |
||msg.includes('˖✧◝(⁰▿⁰)◜✧˖°') | |
||msg.includes('卐') | |
||msg.includes('Robin Autovoter') | |
||msg.includes('└[⊜﹏⊜]┘') | |
||msg.includes('hellen keller') | |
||msg.includes('\u1DCA') | |
||msg.includes('\u0353') | |
||msg.includes('\uFF24') | |
||msg.includes('\u25D5') | |
||msg.includes('\u25D5') | |
||msg.includes('9Mart') | |
||msg.includes('play.google') | |
||msg.includes('voted for #KANYE2020 #STAY') | |
||msg.includes('DuckGod') | |
||msg.includes('Have a burning story to tell') | |
||msg.includes('desperately trying to recreate 4chan') | |
||msg.includes('YEEZY') | |
||msg.includes('CATBRAH') | |
||msg.includes('got to poop') | |
) { | |
mutation.addedNodes[0].style.display = "none"; | |
} | |
}); | |
}); | |
observer.observe(target, {childList: true}); | |
} | |
}, 20); | |
var h=[]; | |
addButtonSetting("Clear muted list", function() {h=[];}); | |
setInterval(function(){ | |
$('.robin-message--from.robin--username').css('cursor', 'pointer').attr('alt', 'Click to block this user'); | |
$('.robin-message--from.robin--username').click(function(){ | |
if ($(this).text() != username) h.push($(this).text());}); | |
$.each(h,function(i,v){$('.robin--username:contains('+v+')').parent().remove();});} | |
,100); | |
$("#robinDesktopNotifier").detach().appendTo("#RESSettingsWidget"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment