infernoboy / javascript-blocker Goto Github PK
View Code? Open in Web Editor NEWA Safari extension that lets you control which scripts can load on any given webpage.
Home Page: http://javascript-blocker.toggleable.com
A Safari extension that lets you control which scripts can load on any given webpage.
Home Page: http://javascript-blocker.toggleable.com
When clicking on the page selector for the first time, it will open just fine. Reopening the popover and trying again, however, will cause the UI to not respond, though Safari itself is still considered responsive. Switching tabs will not work. The only way to make the popover disappear is to switch to another application.
Text fields in popover cannot be focused. This is a known issue with Safari on OS X Lion and Apple is working on a fix.
I have 4.0.9.2 installed. When I try to upgrade to 4.0.9.3, it fails with "An error occurred while installing the extension “JavaScript Blocker”."
Safari: Version 7.0 (9537.71)
OS X 10.9 (13A603)
If I quit Safari with any open windows/tabs and then restart with Javascript Blocker enabled,
Safari 8.0 (stock Yosemite 10.10 browser, with Adblock Plus, ClickToFlash and Javascript Blocker extensions) hangs at startup.
CPU is pegged at 100% and UI is beachballed and unresponsive.
It APPEARS that Javascript Blocker is attempting to pop up some whacky report or whacky dialog.
I'll try to add an "Activity Monitor" generated sampled backtrace once I work out how github attachments work
I'm showing the following in web inspector only when javascript blocker is enabled:
[Error] Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "https://clients4.google.com". Protocols, domains, and ports must match. (x2)
Problem is this is breaking functionality of gmail and google voice and the UI itself gives no indication that this access is blocked by javascript blocker. There does not seem to be a way to create a rule allowing this access or to disable this functionality within the UI or settings. The only way to use java-script blocker with these sites at the moment seems to be to create rules disabling java-script blocker entirely for google domains.
Whenever a tab loads, this extension updates its toolbar badge count in the current window, and in all other windows. To better reflect the status of the "stats" from the current tab, the update should be limited to only the window in which this tab is viewable. Other Safari extensions seem to handle this differently: DoNotTrackMe, AdBlock, etc. See the screenshot showing DoNotTrackMe being appropriate for the visible tab within each window.
When visiting the settings page, jQuery 2 is reports an XMLHttpRequest exception, but only for some people. This is preventing the settings page from loading.
Input field text is no longer markable (field is selectable but text is not markable) by mouse when popover is active (displayed), although mark by keyboard works fine.
firefox 8.0 (but have observed this on most versions)
The layout looks really nice, especially on Mac OS, I would really like to install it on as a userscript on every browser.
Hi, first of all thank you for the great extension. I understand why JSB reenables between Safari restarts for security reasons but it would be nice to have an option/checkbox whereby the user can choose to keep JSB disabled between restarts of safari. I appreciate you even considering the option. Persistence should not be default but an option… Thank you again for the excellent extension. Such a gem.
Hi,
with JavaScript-Blocker and Safari 6.0.5 cmd-click open new tabs always in foreground . Disabling JSB restores normal behavior. Resetting JSB hasn't helped.
Cheers,
Christian
Navigating back/forward can sometimes break JavaScript Blocker. This appears to be yet another issue with Safari itself as other extensions are also affected.
Every time you click the toolbar icon you are reminded of the new 4.1.14 hidden feature setting even though the hide blacklists and whitelists checkbox is not checked in user setings. Then you can only proceed by clicking on the hidden features tab. Extremely annoying!
When you create a rule for a website identified through its IP address the created rule is never saved, regardless whether you have chosen temporarily or always.
I came across two differences with Greasemonkey's GM_xmlhttpRequest
while getting a userscript to work in JS Blocker:
responseHeaders
member of the response object is an object containing headers as key/value pairs whereas Greasemonkey provides the unparsed string from getAllResponseHeaders()
. The former is probably more useful, but if it's provided, it should be under a different name.overrideMimeType
isn't supported, although the same functionality seems to be available through mimeType
. This is useful for downloading binary data using the "text/plain; charset=x-user-defined"
MIME type override hack.Because the width of certain element items rely on the english string length, some elements may overlay each other due to the width expecting the english length of the string.
When visiting a page with a very long URL, such as "http://www.google.com/#sclient=psy-ab&hl=en&safe=off&site=&source=hp&q=aaa&pbx=1&oq=aaa&aq=f&aqi=g4&aql=1&gs_sm=e&gs_upl=1765l2099l0l2274l3l3l0l0l0l0l106l292l1.2l3l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=cd4659920e981d1f&biw=1089&bih=699", the pages pop-up menu will not display the string correctly.
I noticed Safari was leaking memory like mad (consuming all available memory after an hour or two of usage).
I disabled JavaScript-Blocker and and the memory leak went away.
Other extensions in use (and still enabled) are:
AdBlock
ClickToFlash
Incognito
I have recently found that JavaScript-Blocker does not correctly scroll long lists of sites. When scrolling down a list, the list jumps back to the top of the list after a momentary pause in scrolling, making it impossible to edit sites more than about 8 sites down the "blocked" list.
See, for example, the page:
http://www.openculture.com/2013/06/ithe_atlas_of_true_namesi_restores_modern_cities_to_their_middle_earth-ish_roots.html
This page shows up with 13 blocked sites by default on my setup. About 8 items in the list show up in the JavaScript-Blocker pop-up field without scrolling. When I scroll to the bottom of the list, within a second of stopping scrolling the scroll field automatically jumps back to the top of the list.
Safari Version 6.0.5 (8536.30.1)
Mac OS X 10.8.4
I want to disable javascript on Google.com and i've tried every option and combination (incl. inline script blocking) but it seems to not be working.
Am i missing something or is this not supported?
The behaviour i'm after is to have google run without javascript, like if i disable js from the develop menu.
The interface really needs to work like NoScript's. Block all by default (or better, block all coming from different domain) and have a by-domain checkbox dropdown for enabling domain by domain. That's really all most of the users need.
Seems to me this cannot be done now - at least very easily - or then I just don't understand the user interface myself :)
The cause is currently unknown as it appears to happen randomly. The problem occurs only in one tab and Safari is responsive so closing the tab does resolve the issue temporarily.
http://www.tdcanadatrust.com/products-services/banking/index-banking.jsp
After logging in, if I attempt to visit any of the other pages, I get automatically logged out. I have whitelisted all the domains used by the site. Disabling the Javascript Blocker addon allows the site to work normally.
I understand odds are slim you have an account with this bank, so I'm willing to provide additional information if needed.
If the XHR blocker with the black list is enabled, the login in iCloud with a gmail address fails.
It seems to be something related to gmail, because a second iCloud account with an hotmail address works.
Configuration:
OS X 10.8
Safari Version 6.0 (8536.25)
Website: any
Step by step:
It would be nice to add some more localization, but currently don't have many people to create translations.
When I create a custom rule for a page from the page tab, I cannot delete it from the rules page. I can click the delete button to the right of the rule and the delete button will light up like its trying to do something, but after a few seconds the button will go back to the way it was before and the rule will remain.
Possible to host releases with GitHub instead?
OS X 10.9.4, Safari 7.0.5, JavaScript Blocker 4.1.16a.
Apparently 7 scripts were blocked, but they're not listed and there's no way to choose any to be given permission to run, temporary or otherwise.
I get this error
Critical error: TypeError: 'undefined' is not an object (evaluating 'pop.document'),safari-extension://com.toggleable.JavaScriptBlocker-6S8J5HV3H4/c2d253fc/js/global.js,5719
also when I click the toolbar button, a blank field comes up.
Hi there,
First of all I would like to thank all the people involved for this great extension. It basically completed my process of ditching Firefox with its NoScript add-on.
Now I have got a question regarding the configuration: Is there a way to automatically allow resources from all subdomains of the current domain I am on?
For example, it happens frequently that I want to access pages like example.com
and it wants to load scripts or images from www.example.com
or cdn.example.com
and the like. I always need to unblock both subdomains then. Is there an automatic way to always allow resources from subdomains of the same parent domain?
Any page that uses history.pushState or history.replaceState will change the URL, but will not update the JS Blocker object to reflect the change. After some experimenting with the event "window.onpopstate", it appears it just doesn't work. Calling the aforementioned functions does not trigger the event. I am therefore unable to come up with a solution at the moment.
After we added user scripts in JavaScript Blocker, it would be nice to enable and disable certain scripts of them, rather than delete the scripts permanently.
Right now we could do that with include
in the userscript files' header, but this feature would be nice to have, making much easier to enable/disable scripts.
An issue appears to have been introduced in a recent build of Javascript-Blocker that prevents the "Allow All" scripts option from being used in the extension upon a clean installation (not an upgrade from an earlier version). For example:
The only solution I have found is to manually choose to allow each of the 6 scripts one at a time.
I have replicated this behaviour on two Macs that were not previously running Javascript-Blocker. On my iMac that was already running previous builds perfectly, Allow All option works fine - even with the same version as the Macs that can't use it. I have only attempted to install and use Javascript-Blocker on these two other Macs recently.
On the Macs where this doesn't work, I've tried resetting Safari back to default. I have blown away all my settings and preferences by removing the Safari preferences folder, and restarting Safari to rebuild this from scratch. I then attempt to reinstall Javascript-Blocker but the same problem remains I cannot use Allow All.
Please consider modifying the behavior of the "Let me confirm when an AJAX request is allowed to POST or GET information" feature.
I like being informed when these requests are being made and having the ability to deny them. The problem is that they usually come in clusters, so the user is effectively bombarded with several confirmation dialogs in a row.
I think a better way to handle this might be to add a "allow subsequent requests" checkbox or 3rd button to the dialog that pops up.
Once enabled, the "allow subsequent requests" state could be kept active perhaps only for a certain timeframe (several seconds/minutes) or until the user navigates away from the current page.
It would be even better if once the "allow subsequent requests" state is enabled, the user would still be notified when such requests are made (perhaps with a little floating notification in a corner of the browser) but not pestered with a dialog asking to explicit allow them.
Going even further, the floating notification (or whatever) could be made to provide—when clicked or hovered—the history of all such requests made while the "allow subsequent requests" state has been active for the current page.
And finally, if you really wanted to go nuts with that, you could make it to where the user could interact with that history. The user could select individual requests and pull up an interface that would let them configure the extension to allow/disallow similar future requests (maybe with a regex?). I'm thinking something like the current management rule interface.
I have an in my Safari Popover. But everytime I try to click on the button to open the Open File Dialog Box, the Extension closes with the dialog box or it doesn't get opened at all. Any advices?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.