OnLoad scripts

This extension allows us to run scripts when the page loads

OnLoad scripts

Extension stats

Users: 637
Rating: 4.80
(10)
Version: 1.0 (Last updated: 2016-04-05)
Creation date: 2016-04-05
Risk impact: Low risk impact
Risk likelihood:
Manifest version: 2
Permissions:
  • storage
Size: 20.76K

Other platforms

Not available on Android
Not available on Firefox
Not available on Edge
Want to check extension ranking and stats more quickly for other Chrome extensions? Install Chrome-Stats extension to view Chrome-Stats data as you browse the Chrome Web Store.

Extension summary

We can specify any javascript in the options, that we want to execute on document load, we can make it conditional based on window.href etc. e.g. stop videos autoload. // this list is auto-updated var videos = document.getElementsByTagName("video" ); function stopVideosPreload(){ for( var j=0; j< videos.length; j++){ videos[j].preload = "none"; } }

var obs = new MutationObserver( function(mutations, observer){ stopVideosPreload(); }

See more

User reviews

Did just exactly what i was looking for !
by Nicholas Khoo, 2022-07-03

Did exactly what I needed. Very good. The only improvement I can think of is to add syntax highlighting and autosave.
by Mateo White, 2022-04-21

Decent solution for dirty tasks! :) Suppose, you hate Jira and its unavoidable habit to enter the edit mode on the description click. So you just save this chunk in the extension options, and that's it: only ⌘+Click opens the editor! document.addEventListener('click', ((event)=>{ if (event.metaKey || event.ctrlKey || document.body.id !== 'jira') { return; } let e = event.target; let contentWrapperFound; while (e && e !== document && e.tagName !== 'A') { if (!contentWrapperFound && ( e.matches('div[class^="ContentWrapper_"]') || e.matches('div[class^="ak-renderer-document"]') )) { contentWrapperFound = true; } else if (e.matches('div[role="presentation"]')) { if (contentWrapperFound) { console.log("CLICKED TO NOT EDIT, hold ctrl/cmd if you really want the thing to happen"); event.preventDefault(); event.stopPropagation(); return false; } else { break; } } e = e.parentNode; } } ), { capture: true });
by Vadym Milichev, 2021-12-01
View all user reviews

Extension safety

Risk impact

OnLoad scripts requires very minimum permissions.

Risk likelihood

OnLoad scripts may not be trust-worthy. Avoid installing if possible unless you really trust this publisher.

Upgrade to see risk analysis details

Similar extensions

Here are some Chrome extensions that are similar to OnLoad scripts: