Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
146 user(s) are online (134 user(s) are browsing Forums)

Members: 0
Guests: 146

more...

Support us!

Headlines

 
  Register To Post  

(SOLVED) Is "NoScript" for Odyssey possible?
Home away from home
Home away from home


See User information
I'm hoping that Fab or someone else might be able to give me a few hints here. I'd like to write an Odyssey extension (aka "Script") which optionally enables or disables JavaScript on certain websites, but I'm not even sure if it is possible.

I found mention of "WebKit::WebPermissionClient::allowScript" here:
http://marc.info/?l=webkit-dev&m=136370783422321&w=2

But it appears to be an internal C++ method, which is probably not exposed to Scripts:
https://github.com/adobe/webkit/blob/m ... lic/WebPermissionClient.h

However, that earlier webpage also suggests simply stripping the JavaScript parts of a webpage, before they get executed. That sounds somewhat plausible, but also rather messy, slow & error prone (and might miss some JavaScript).

I can't immediately see anything useful here:
https://developer.apple.com/library/sa ... le_ref/doc/uid/TP40001482

I found this really old "JavaScript-Blocker" for Safari, which is sufficiently old that it's basic mechanism(s) might work on our WebKit, but it's a bit too complex for me to fathom:
https://github.com/infernoboy/JavaScript-Blocker
( https://github.com/infernoboy/JavaScri ... /blob/master/js/chrome.js )
( https://github.com/infernoboy/JavaScri ... blob/master/js/blocker.js )

Disabling JS seems to be trivial from Chrome, but I'm a little doubtful that "chrome.contentSettings.javascript" will be available on WebKit:
https://developer.chrome.com/extensions/contentSettings
* I read that "In ScriptNo v1.0.6.0, the minimum Chrome version required was 17.0 because of the fact that the webRequest and contentSettings APIs were made stable only in this milestone release."
* It seems that version of Chome roughly corresponds to "WebKit 535.11" from 2012-02-08. I'm not clear if this means it exists in our WebKit or not...
* It seems that Odyssey 1.21 used "WebKit r155188 (October 2013)", but * I'm still not clear if this means it supports it... I guess I'll have to just try it (never done a Script before) and see, unless Fab or anyone can confirm.
* I can't even get the "Hello.js" Script to work, so frustratingly stuck at the moment...

Does anyone know of any other way that might work?


P.S. My reason for wanting to implement "NoScript" is that I've gotten fed-up of some web sites taking forever to load in Odyssey, unless I manually disable JavaScript, not to mention the security risks of running JavaScript on an extremely outdated browser. I could globally disable JavaScript, but then I'll have to manually enabled it on every website that needs it for functionality that I use, which could become very tedious.


Edited by ChrisH on 2016/6/29 10:02:10
Edited by ChrisH on 2016/6/29 10:03:47
Edited by ChrisH on 2016/6/29 10:09:07
Edited by ChrisH on 2016/6/29 10:13:57
Edited by ChrisH on 2016/6/29 10:23:32
Edited by ChrisH on 2016/7/1 8:27:53
Edited by ChrisH on 2016/7/1 12:17:54
Go to top
Re: Is "NoScript" for Odyssey possible?
Home away from home
Home away from home


See User information
Menu->Windows->UrlSettings already offers the feature to optional turn of javascript on a given URL.


Go to top
Re: Is "NoScript" for Odyssey possible?
Home away from home
Home away from home


See User information
@broadblues
THANKS.

It seems rather perverse that Odyssey hides some settings, putting them under Windows rather than Settings :(

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project