Posted by Andrés on
Hello, the libreJS Firefox addon found the following in our groups website, is there anything that can be done to make the blocked javascript compiant? ************************** List of accepted JavaScript in http://www.hamunitedgroup.org.uk/ This script has been tagged as free software by LibreJS authors. http://code.jquery.com/jquery-1.11.0.min.js List of blocked JavaScript in http://www.hamunitedgroup.org.uk/ Whitelist NONTRIVIAL: an open method similar to xhr.open is used // Whitelist NONTRIVIAL: an open method similar to xhr.open is used // Whitelist NONTRIVIAL: an open method similar to xhr.open is used if (window.runAnalytics == undefined) { (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-9535378-1', 'auto'); ga('set', 'userId', '4804960'); ga('send', 'pageview', '/hamunitedgroup/'); } Whitelist This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts [{"attribute":"onfocus","value":"if(this.value==this.defaultValue) this.value='';"},{"attribute":"onblur","value":"if(this.value=='') this.value = this.defaultValue;"}] Whitelist This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts [{"attribute":"onclick","value":"el=document.getElementById('searchQ');\n if(el.value==el.defaultValue) {\n el.focus();\n return false;\n }\n return true;"}] Whitelist This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts [{"attribute":"onclick","value":"return false;"}] Whitelist This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts [{"attribute":"onclick","value":"STTAFFUNC.cw(this, {id:'2009120831158', link: window.location, title: document.title });"},{"attribute":"onmouseover","value":"STTAFFUNC.showHoverMap(this, '2009120831158', window.location, document.title)"},{"attribute":"onmouseout","value":"STTAFFUNC.hideHoverMap(this)"}] Whitelisterror parsing: ReferenceError: type is not defined http://www.hamunitedgroup.org.uk/resources/core.js Whitelisterror parsing: ReferenceError: type is not defined http://cdn.socialtwist.com/2009120831158/script.js *************************
2: Re: non-free Javascript (response to 1)
Posted by Andrés on

List of accepted JavaScript in http://www.hamunitedgroup.org.uk/

List of blocked JavaScript in http://www.hamunitedgroup.org.uk/

  • Whitelist
    NONTRIVIAL: an open method similar to xhr.open is used
    // <![CDATA[ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); // ]]>
  • Whitelist
    NONTRIVIAL: an open method similar to xhr.open is used
    // <![CDATA[ (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); // ]]>
  • Whitelist
    NONTRIVIAL: an open method similar to xhr.open is used
    if (window.runAnalytics == undefined) { (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-9535378-1', 'auto'); ga('set', 'userId', '4804960'); ga('send', 'pageview', '/hamunitedgroup/'); }
  • Whitelist
    This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
    [{"attribute":"onfocus","value":"if(this.value==this.defaultValue) this.value='';"},{"attribute":"onblur","value":"if(this.value=='') this.value = this.defaultValue;"}]
  • Whitelist
    This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
    [{"attribute":"onclick","value":"el=document.getElementById('searchQ');\n if(el.value==el.defaultValue) {\n el.focus();\n return false;\n }\n return true;"}]
  • Whitelist
    This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
    [{"attribute":"onclick","value":"return false;"}]
  • Whitelist
    This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
    [{"attribute":"onclick","value":"STTAFFUNC.cw(this, {id:'2009120831158', link: window.location, title: document.title });"},{"attribute":"onmouseover","value":"STTAFFUNC.showHoverMap(this, '2009120831158', window.location, document.title)"},{"attribute":"onmouseout","value":"STTAFFUNC.hideHoverMap(this)"}]
  • Whitelisterror parsing: ReferenceError: type is not defined
    http://www.hamunitedgroup.org.uk/resources/core.js
  • Whitelisterror parsing: ReferenceError: type is not defined
    http://cdn.socialtwist.com/2009120831158/script.js

    4: Re: non-free Javascript (response to 2)
    Posted by Voice Admin on

    I don't think realistically you're going to be able to unblock this - since the site "legitimately" uses some non-free JavaScript.

    Though, to be honest, I don't really see that this is a problem. If LibreJS users want to block the JavaScript then the site should still work properly I think. The things like the Twitter Sharing widget, and Google Analytics won't work, but I assume that's the entire point of running LibreJS, that you don't want these things running in your browser!

    Note also that some of the blocked items are things that have been added to the site by the site administrators - not by us. The Twitter button for example.

    For the most part the site has been designed to work properly without any JavaScript at all. So if users do want to disable it then I guess that's up to them! :-)

    (Though I note that, yes, it's difficult to format forum posts without the WYSIWYG editor being loaded. Though since this uses TinyMCE, which is licenced under the LGPL, then I'm not really sure why LibreJS is complaining about it!)

    Thanks

    Joe - Voice Admin

    3: Re: non-free Javascript (response to 1)
    Posted by Andrés on
    Sorry for the lack of formating! I have improved it I think.