// ==UserScript== // @name TOS Inspector // @namespace Utopiah // @description Understand and help other to understand cryptic terms of services // @include *facebook.com* // ==/UserScript== /* Work on the wiki side service template tos monitoring tools diff tools patterns to look for ... */ serviceName="Facebook"; serviceAlternatives='Diaspora'; tosPath="TrackedTOS"; wikiUrl="http://self/devpim/"; GM_xmlhttpRequest({ method: "GET", url: wikiUrl+tosPath+"/"+serviceName+"?action=source", onload: function(response) { tos = response.responseText; GM_setValue("tosLastResult",responseCheck(tos)); } }); function responseCheck(tos) { if (tos == 'Ok' ){ return 'TOS ok :)'; } if (tos == 'Meh'){ return 'Warning (consider those settings)'; } if (tos == 'Bad'){ return 'BAD TOS! (try '+serviceAlternatives+' instead)'; } } tosRendering = GM_getValue("tosLastResult",'Warning ToS not found, please consider adding it.'); var myDiv = document.createElement('div'); myDiv.id = "GM_TOS_Inspector_Window"; myDiv.innerHTML += "

"+tosRendering+"

"; boxcss = 'position:fixed; right:5px; top:50px; background-color:white; z-index:1; opacity:0.9;'; boxcss += 'padding:2px; margin:1px;'; boxcss += 'color:blue; font-size:10px; text-align:right;'; boxcss += 'border-width:3px; border-color:gray; border-style:solid;'; myDiv.style.cssText = boxcss; document.body.appendChild(myDiv);