From a168da802a6ead445ae1d3c804d9edcbfe8d9f77 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Mon, 25 Jul 2011 17:03:15 +0200 Subject: [PATCH] non-test initial release --- greasemonkey/tos_inspector.user.js | 44 ++++++++++++++++++++++++++++++ shell_scripts/pmwiki_social_search | 1 + 2 files changed, 45 insertions(+) create mode 100644 greasemonkey/tos_inspector.user.js 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+"

"; +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); diff --git a/shell_scripts/pmwiki_social_search b/shell_scripts/pmwiki_social_search index 6647bfa..b8b58cf 100755 --- a/shell_scripts/pmwiki_social_search +++ b/shell_scripts/pmwiki_social_search @@ -9,6 +9,7 @@ # note that by default PmWiki does so, thus one should be able to authentificate # support CVS and text-file based PIM # via wget -c or cvs clone then grep and find +# e.g. ex_nihilo.blinkenshell.org/index.txt QUERY="?action=search&q=fmt%3D%23simple+"