NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name May the force block the spoilers // @namespace https://www.facebook.com/iceman358 // @description Facebook StarWars Spoiler Stopper // @include https://www.facebook.com/* // @include https://web.facebook.com/* // @include https://mobile.facebook.com/* // @include https://m.facebook.com/* // @include http://www.facebook.com/* // @include http://web.facebook.com/* // @include http://mobile.facebook.com/* // @include http://m.facebook.com/* // @version 1 // @require http://code.jquery.com/jquery-2.1.4.min.js // @require https://gist.github.com/raw/2625891/waitForKeyElements.js // @grant GM_addStyle // ==/UserScript== $(document).ready(function(){ //ΔΟΥΛΕΥΕΙ: Προσθήκη style cencored στο HEAD //μέσα στο document ready για να έχει πρώτα head var css = ".censored{background-color:black !important;color:black !important;}"; if (typeof GM_addStyle != "undefined") { GM_addStyle(css); } else if (typeof PRO_addStyle != "undefined") { PRO_addStyle(css); } else if (typeof addStyle != "undefined") { addStyle(css); } else { var node = document.createElement("style"); node.type = "text/css"; node.appendChild(document.createTextNode(css)); var heads = document.getElementsByTagName("head"); if (heads.length > 0) { heads[0].appendChild(node); } else { document.documentElement.appendChild(node); } } }); function censor (enemy) { //ΔΟΥΛΕΥΕΙ: BADWORDS var badwords = ["deathstar", "yoda", "sith", "r2d2", "c3po", "star", "wars", "comment", "Rey", "Force", "Awakens", "Luke", "Skywalker", "Han", "Solo", "Princess", "Leia", "Kylo", "Ren", "Daisy", "Ridley", "BB-8", "Finn", "Boyega", "Driver", "Oscar", "Isaac", "Poe", "Dameron", "Stormtroopers", "Stormtrooper", "Episode", "VII", "disc", "Jedi", "Knight", "Andy", "Serkis", "Snoke", "Organa", "Fisher", "Mark Hamill", "Galactic", "Empire", "Harrison", "Ford", "Lightsaber", "darth", "vader", "anakin", "obi", "wan", "kenobi", "disney", "Tatooine", "starwars", "σταργουωρς", "σταρ", "γουωρζ", "σταργουωρζ"]; //ΔΟΥΛΕΥΕΙ: Προσθήκη class censored εκεί που πρέπει var i; var j; var k; for (i = 0; i < enemy.length; i++) { var tempstring = enemy[i].textContent; var arraytobetested = tempstring.toLowerCase().split(" "); for (j = 0; j < arraytobetested.length; j++) { for (k = 0; k < badwords.length; k++) { if (arraytobetested[j].match(badwords[k].toLowerCase())){ enemy[i].className = enemy[i].className + " censored"; } } } } }//ΔΟΥΛΕΥΕΙ: Επιλογή των επικίνδυνων σημείων του facebook και αναμονή AJAX waitForKeyElements ("._5pco, .UFICommentBody, ._6m3, ._6m3 a, .userContent, .bq, .eb, .br, .cx, .fk, .fm, .fn, .cd, .p, .cc", censor);