Kongregate LinkTester

Tests links against a checklist

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name Kongregate LinkTester
// @description Tests links against a checklist
// @include http://www.kongregatestage.com/games/*
// @author Zaphio
// @version 7
// @date 10/07/10
// @namespace https://greatest.deepsurf.us/users/32649
// ==/UserScript==
var googleAPI=document.createElement("script");googleAPI.setAttribute("type","text/javascript");googleAPI.setAttribute("src","http://www.google.com/jsapi");document.body.appendChild(googleAPI);window.location.href="javascript:("+
function(){var url="http://spreadsheets.google.com/tq?tqx=out:json&tq=select%20*&key=0Aq9gclOUtmuudE5iZUZBNXc1ZjFDMjhYdzZQTDQ4LVE";var blacklist={};var whitelist=[];function sendQueryCallback(response){if(response.isError()){console.log("Error in query: "+response.getMessage()+": "+response.getDetailedMessage());return;}
console.log("Query succesfull, attaching to holodeck.");var dt=response.getDataTable();whitelist=dt.getDistinctValues(1);for(var i=2,len=dt.getNumberOfColumns();i<len;i++){blacklist[dt.getColumnLabel(i)]=dt.getDistinctValues(i);}
window.holodeck._event_dispatcher.register('room_message',function(event){var message=event.data.message.toLowerCase();function showMsg(msg){window.holodeck._active_dialogue.displayMessage('LinkTester',msg,{'class':'whisper received_whisper'},{'non_user':true});}
function findStr(arr,str){return arr.find(function(e){if(!e){return false;}
return str.include(e);});}
for(var a in blacklist){console.log("Testing category: "+a);var mat=findStr(blacklist[a],message);if(mat!==undefined){if(findStr(whitelist,message)!==undefined){console.log("Whitelisted, ignoring.");return;}else{showMsg("WARNING: Malicious link detected! (match: "+mat+", type: "+a+").");}}}});}
function loadPackageCallback(){if(google.visualization.Query!==undefined){console.log("Visualization package loaded.");var query=new google.visualization.Query(url);query.send(sendQueryCallback);console.log("Query sent.");}else{window.setTimeout(function(){loadPackageCallback();},250);}}
window.setTimeout(function(){console.log("Loading visualization package.");google.load("visualization","1",{"packages":["table"],"callback":loadPackageCallback});},1000);}+")();void(0);";