Bookmarklets: Running JavaScript on Managed Chromebooks
Create and run JavaScript bookmarklets on managed Chromebooks to bypass restrictions, disguise tabs, flood history, and run arbitrary scripts using AdGuard, Sh0vel, and Point-Blank.
Use this file to discover all available pages before exploring further.
A bookmarklet is simply a browser bookmark whose URL starts with javascript: instead of https://. When clicked, the browser executes the JavaScript code directly on the current page — no extension required. On managed Chromebooks this makes bookmarklets extremely powerful: they can modify the DOM, prevent tab closes, flood history, disguise page titles, and in some cases access privileged Chrome APIs. However, Google patched direct javascript: execution in bookmark URLs on newer versions of ChromeOS (roughly v108 and above), so many of these techniques require staying on an older version or using one of the runner methods described below to work around the restriction.
If the bookmark bar is not visible beneath the address bar, press Ctrl + Shift + B to show it.
2
Right-click the bookmark bar
Select Add Page from the context menu.
3
Enter a name
Type any name you want into the top field — this is only for your reference.
4
Paste the bookmarklet code as the URL
In the URL field, paste the full javascript: code you want to run.
5
Confirm the location
Make sure the save location is set to the Bookmarks bar so it is easily accessible.
6
Press Save
The bookmarklet will now appear on your bookmark bar. Click it on any page to execute the code.
JavaScript bookmarklets were patched in newer versions of ChromeOS — clicking a javascript: bookmark will do nothing on affected versions. To use bookmarklets directly you will need to be on an older ChromeOS version. Use CAUB to prevent automatic updates and stay on a compatible version. If you are already on a newer version, use one of the runner methods below (AdGuard, uBlock, or Sh0vel) to execute bookmarklet code without relying on the native bookmark URL behaviour.
The following methods let you run bookmarklet code even when the native javascript: bookmark URL is blocked by policy or patched by ChromeOS.
AdGuard Runner (MV3)
The AdGuard extension supports User Scripts, which can intercept a keyboard shortcut and evaluate arbitrary JavaScript — effectively recreating bookmarklet execution in MV3.Credits: schoolexploitkid / Titanium Network
1
Install AdGuard
Install the AdGuard AdBlocker extension from the Chrome Web Store.
2
Enable User Scripts
Navigate to chrome://extensions/?id=bgnkhhnnamicmpeenaelnjfhikgbkllg and toggle Enable User Scripts on.
3
Open Extension Options
Click Extension Options on the same page.
4
Go to User Rules
Navigate to the User Rules section in the AdGuard options.
5
Add the runner rule
Add the following rule and click Save:
*#%#window.addEventListener("keyup", event => { if (event.ctrlKey && event.which === 192) { let code = prompt("Eval:"); if (code && code.startsWith("javascript:")) { code = code.substring(11); } if (code) { eval(code); } } });
6
Use it
On any page, press Ctrl + \`` (backtick). A prompt will appear — paste your bookmarklet code (with or without the javascript:` prefix) and press OK.
Sh0vel Runner
Sh0vel lets bookmarklets run on almost any URL — including privileged chrome:// pages — by injecting through an existing extension that has the right permissions. It is most powerful when combined with Skiovox Breakout.Credits: Writable, Hannah / Titanium NetworkRequirements: An installed extension that has all of the following in its manifest:
tabs permission
activeTab permission
browserAction or browser_action
unsafe-eval in the Content Security Policy
1
Get code execution in an extension
Obtain code execution inside a suitable extension — via Point-Blank, Skiovox Breakout, RigTools, XSS, DNS spoofing, or another method. Verify the extension has the permissions listed above by checking chrome-extension://EXTENSION_ID/manifest.json.
2
Enable the chrome-urls flag
Navigate to chrome://flags and enable the #extensions-on-chrome-urls flag, then restart.
3
Inject the bookmarklet via browserAction
Place your bookmarklet inside the following template and make the extension execute it:
Click the extension icon in the toolbar. If done correctly, your bookmarklet will execute on the target page.
Point-Blank
Point-Blank lets you run bookmarklets on privileged chrome:// pages by exploiting a window opener relationship. Bookmarklets must not be blocked by policy for this to work.Credits:https://blog.bypassi.com/_/point-blank/
1
Navigate to the reset page
Go to chrome://settings/resetProfileSettings.
2
Click Current Settings
A new tab or window will open from the settings page, creating an opener relationship.
3
Run a bookmarklet
On the newly opened page, run the following as a bookmarklet:
javascript:opener.alert()
4
Profit
You are now executing code in the context of the chrome://settings tab using only a bookmarklet.
Point-Blank New (Swamp)
Swamp is an updated version of Point-Blank that remained unpatched on ChromeOS versions up to v107. It functions similarly to LTBEEF and can disable force-installed extensions, run bookmarklets on any page, and execute custom code with broad Chrome API access.Credits:3kh0/ext-remover / Titanium NetworkCapabilities:
Disable force-installed extensions (similarly to LTBEEF) even on Chrome 107
Run bookmarklets on any page even when they are blocked by policy
Break extensions until a powerwash (or until you choose to re-enable them)
Run a custom DNS to block network requests without being on a real DNS
Run custom code with access to most of the Chrome API
1
Bookmark the Swamp script
Bookmark the code at: https://raw.githubusercontent.com/3kh0/ext-remover/main/newpointblank.js
2
Go to your blocker extension's block page
Open the link that matches your school’s blocking extension:Securly:
Each page will have a blue link. Click it — it should open a blank page.
4
Click the Swamp bookmarklet
On the blank page, click the bookmarklet you saved in Step 1.
5
Choose disable mode
Click Hard disable (permanent until powerwash) or Soft disable (until restart). Soft disable is recommended.
Securly has patched this exploit for newer versions of its extension. If it does not work, try the alternate Securly link (extension ID joflmkccibkooplaeoinecjbmdebglab). GoGuardian may also have patched this in newer extension versions.
Changes the page title and favicon so the tab looks like a Google Drive page to a passing observer. You can customise the favicon URL and title text to impersonate any site.Option 1 — Single change:
javascript: (function () { var link = document.querySelector("link[rel*='icon']") || document.createElement("link"); link.type = "image/x-icon"; link.rel = "shortcut icon"; link.href = "https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico"; document.title = "My Drive - Google Drive"; console.log(document.title); document.getElementsByTagName("head")[0].appendChild(link);})();
Option 2 — Updates every second (more persistent):
javascript: function gcloak() { var link = document.querySelector("link[rel*='icon']") || document.createElement("link"); link.type = "image/x-icon"; link.rel = "shortcut icon"; link.href = "https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico"; document.title = "My Drive - Google Drive"; document.getElementsByTagName("head")[0].appendChild(link);}gcloak();setInterval(gcloak, 1000);
To customise: replace the link.href value with your own image URL, replace the title string, and adjust the interval (in milliseconds) as needed.Credits: Titanium Network
The Tab Disguiser requires the ability to use javascript: in bookmarks. It was patched in newer versions of ChromeOS.
Floods your browsing history with the current page’s URL a specified number of times, making it harder to find specific entries. Run on any page.
Entering too large a number will crash Chrome. Chrome history on ChromeOS is retained for approximately 3 months.
javascript:var num=prompt("How many times do you want this page to show up in your history?");done=false;x=window.location.href;for (var i=1; i<=num; i++){history.pushState(0, 0, i==num?x:i.toString());if(i==num){done=true}}if(done===true){alert("Flooding successful!\n "+window.location.href+" \nis now in your history "+num+(num==1?" time.":" Times. "))}
Credits: BlazerHM
Patched in newer versions of ChromeOS — javascript: was patched in bookmarks.
Cycles the managed background through generic colours using the ASH debugging shortcuts flag. Not very practical but demonstrates policy override capability.
1
Enable the flag
Go to chrome://flags and enable the ASH debugging shortcuts flag, then restart.
2
Cycle the background
Press Ctrl + Alt + B to cycle through generic colour backgrounds.