Page 1 of 1

Allow custom javascripts

Posted: Sun Dec 06, 2009 9:13 am
by VSUB
Is it possible to allow special JavaScript function without allowing the whole site.

Recently I downloaded one add-on that I really like but that add-on is not working properly unless I allow the script to the site.The add-on is Highlighter and the function to go to the marked text is not working because it requires JavaScript to be enabled(javascript:scrollTo)and also there is a function to warn if I try to leave a page with marked text(which is also not working because of the disabled JavaScript)

Re: Allow custom javascripts

Posted: Sun Dec 06, 2009 9:56 am
by Giorgio Maone
No, it's not possible.
On the other hand, add-ons are privileged and can do everything they want (included the actions you mentioned) without using content-level JavaScript, so I consider this an Highlighter bug.
It's up to the Highlighter developers to implement these functionality properly in order to make it work with JavaScript disabled.

Re: Allow custom javascripts

Posted: Sun Dec 06, 2009 10:01 am
by VSUB
I doubt that he even remember creating such add-on(his last update was 3 years ago).
Can you give me some directions where to read to try fixing the add-on myself(other possibilities how that functions may work)

Re: Allow custom javascripts

Posted: Sun Dec 06, 2009 12:30 pm
by Giorgio Maone

Re: Allow custom javascripts

Posted: Sun Dec 06, 2009 12:53 pm
by VSUB
Giorgio Maone wrote:I did it for you:
https://secure.informaction.com/downloa ... script.xpi
I really appreciate this,really thanks.
btw there is one line in highlighter.js
Is it ok to write there

Code: Select all

item.appendChild(doc.createTextNode(decodeURI("here")));
whatever I want because that enter symbol doesn't look very good.

Re: Allow custom javascripts

Posted: Sun Dec 06, 2009 1:22 pm
by Giorgio Maone
VSUB wrote:
Giorgio Maone wrote: btw there is one line in highlighter.js
Is it ok to write there

Code: Select all

item.appendChild(doc.createTextNode(decodeURI("here")));
whatever I want because that enter symbol doesn't look very good.
Yes, it is.

Re: Allow custom javascripts

Posted: Sun Dec 06, 2009 1:31 pm
by VSUB
Ok thanks,now that add-on works exactly how I wanted and it also works almost like one other add-on(for locking tabs)...it's adding more extras for locking tabs :)

Re: Allow custom javascripts

Posted: Mon Jan 25, 2010 8:10 am
by vsub
Can you help me again,the add-on highlighter is not working on 3.6 :(