You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
misc/greasemonkey/tos_inspector.user.js

68 lines
2.8 KiB

// ==UserScript==
// @name TOS Inspector
// @namespace Utopiah
// @description Understand and help other to understand cryptic terms of services
// @include *facebook.com*
// ==/UserScript==
/*
Terms of service (ToS) or term of usage or end-user license agreement (EULA)
or any legally binding documents users of web services have to agree with yet never read
because they are made not to be read by any individual.
On the other hand, a large group of individual can much more easilly spread the load
and help itself by contributing what he can when he can, providing a basis for improvements
for others and producing stigmergy.
Work on the wiki side
service template
tos monitoring tools
diff tools
patterns to look for
...
*/
serviceName="Facebook";
serviceAlternatives='<a href="http://joindiaspora.com">Diaspora</a>';
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 '<img src="'+wikiUrl+'pub/gray-light.png" /><img src="'+wikiUrl+'pub/gray-light.png" /><img src="'+wikiUrl+'pub/green-light.png" /><font color="green">TOS ok :)</font>';
}
if (tos == 'Meh'){
return '<img src="'+wikiUrl+'pub/gray-light.png" /><img src="'+wikiUrl+'pub/orange-light.png" /><img src="'+wikiUrl+'pub/gray-light.png" /><font color="orange">Warning</font> (consider those settings)';
}
if (tos == 'Bad'){
return '<img src="'+wikiUrl+'pub/red-light.png" /><img src="'+wikiUrl+'pub/gray-light.png" /><img src="'+wikiUrl+'pub/gray-light.png" /><font color="red">BAD TOS!</font> (try '+serviceAlternatives+' instead)';
}
}
tosRendering = GM_getValue("tosLastResult",'<img src="'+wikiUrl+'pub/orange-light.png" /><font color="orange">Warning</font> ToS not found, please consider <a href="'+wikiUrl+tosPath+'/'+serviceName+'Analysis">adding it</a>.');
var myDiv = document.createElement('div');
myDiv.id = "GM_TOS_Inspector_Window";
myDiv.innerHTML += "<p class=\"tos_render\">"+tosRendering+"<ul>"
// +"<li>Tune your settings<li/>"
+"<li>Have your doubt or think it is not correct?<br/>Contribute to <a href=\""+wikiUrl+tosPath+"/"+serviceName+"Analysis\">the ToS wiki page for this service</a>.</li>"
+"</ul></p>";
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);