3 ms·
> it defines functions or methods and either loads an external script (from html) or is loaded as one, Under this particular term, I can't think of a single we
by falcolas 12y ago
> it defines functions or methods and either loads an external script (from html) or is loaded as one,
Under this particular term, I can't think of a single web site that I have written which would be considered to be "trivial".
That said, I appreciate the underlying concern - that without significant changes to the browser, you have little to no fine-grained control over what is run by that browser. While there are add-ons which block scripts from running entirely, there are no add-ons that I know of [0] which would allow you to run a user-provided alternative to a script specified by the web page.
[0] I can, actually, think of way to potentially work around this with a combination of greasemonkey and NoScript - block certain scripts and provide your own functions which mirror those provided by the blocked scripts. Would make for an interesting project.
- tedunangst 12y agoI would upvote your comment, but I think the javascript HN uses for that might qualify as nontrivial, and I don't want to taint my computer with nonfree software.
- wtbob 12y agoHN permits up-voting using straight HTML. It's annoying, because it reloads the entire page, but it does work.
- pmoriarty 12y agoThis is exactly how I up-vote on HN. I don't want to run any Javascript in my browser at all, and I am grateful to HN for giving us that option. I wish more websites would follow suit.
- TazeTSchnitzel 12y agoI'm one of those few people who still includes <noscript> tags to at least warn you the page is non-functional without JS.
- gsnedders 12y ago> While there are add-ons which block scripts from running entirely, there are no add-ons that I know of which would allow you to run a user-provided alternative to a script specified by the web page. It's a decidedly non-trivial problem problem — how are we identifying a script? Some sites (FB used to, at least) often serve the same scripts from different hostnames (based on what CDN you're connected to, I believe). What happens if the same script (say, jQuery!) is downloaded from two entirely different sites? What if I change some comment, is that still the same script? What if I minify it and variable names change? What if we allow some small semantically equivalent changes? What if the script is non-cacheable and changes on every load (some are!), how do we replace that? Presto-based desktop releases of Opera would allow you to modify code (and HTML and CSS) on a page identifying it by URL, but I don't know of anything else comparable.