diff --git a/greasemonkey/tos_inspector.user.js b/greasemonkey/tos_inspector.user.js new file mode 100644 index 0000000..f2594a2 --- /dev/null +++ b/greasemonkey/tos_inspector.user.js @@ -0,0 +1,44 @@ +// ==UserScript== +// @name VirtualBlinders +// @namespace Utopiah +// @description Stay focus, damnit! +// @include *facebook.com* +// ==/UserScript== + +serviceName="Facebook"; +serviceAlternatives="http://diaspora.com"; +wikiUrl="http://self/devpim/" + +GM_xmlhttpRequest({ + method: "GET", + url: wikiUrl+"pub/tos_status", + onload: function(response) { + task = response.responseText; + responseCheck(tos); + } +}); + +function responseCheck(tos) { + if (tos == 'ok\n' ){ + tos_rendering = 'TOS ok :)'; + } + if (tos == 'meh\n'){ + tos_rendering = 'Warning (consider those settings)'; + } + if (tos == 'bad\n'){ + tos_rendering = 'BAD TOS! (try '+serviceAlternatives+'instead)'; + } +} + +var myDiv = document.createElement('div'); +myDiv.id = "GM_PIM_Window"; +myDiv.innerHTML += "
"+tosRendering+"