Search for a command to run...
Useful JavaScript bookmarklets for ad account management. Copy the code and save as a browser bookmark.
How to use: Copy the code, create a new bookmark in your browser, paste the code as the URL, and click the bookmark on any page.
Extracts all numeric IDs (8+ digits) from the current page and copies them to clipboard.
javascript:(function(){var ids=[...document.body.innerText.matchAll(/\b\d{8,}\b/g)].map(m=>m[0]);var unique=[...new Set(ids)];navigator.clipboard.writeText(unique.join('\n'));alert('Copied '+unique.length+' IDs');})();Toggles a dark overlay on any website for easier reading in low light.
javascript:(function(){var el=document.getElementById('__dm_overlay');if(el){el.remove();}else{var d=document.createElement('div');d.id='__dm_overlay';d.style.cssText='position:fixed;inset:0;background:#000;opacity:0.45;pointer-events:none;z-index:999999;mix-blend-mode:multiply;';document.body.appendChild(d);}})();Clears all cookies for the current domain. Useful for testing fresh sessions.
javascript:(function(){document.cookie.split(';').forEach(function(c){document.cookie=c.trim().split('=')[0]+'=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;';});alert('Cookies cleared for '+location.hostname);})();Opens the current page's HTML source in a new browser tab.
javascript:(function(){window.open('view-source:'+location.href,'_blank');})();Adds floating buttons to quickly jump to the top or bottom of any page.
javascript:(function(){if(document.getElementById('__scroll_btns'))return;var s=document.createElement('div');s.id='__scroll_btns';s.style.cssText='position:fixed;bottom:20px;right:20px;z-index:999999;display:flex;flex-direction:column;gap:6px;';s.innerHTML='<button onclick="window.scrollTo(0,0)" style="padding:8px 12px;background:#333;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:14px;">▲ Top</button><button onclick="window.scrollTo(0,document.body.scrollHeight)" style="padding:8px 12px;background:#333;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:14px;">▼ Bottom</button>';document.body.appendChild(s);})();Outlines all hyperlinks on the page in red so you can spot them easily.
javascript:(function(){var links=document.querySelectorAll('a');links.forEach(function(a){a.style.outline='2px solid red';});alert('Highlighted '+links.length+' links');})();