{"id":20383454,"url":"https://github.com/staticph/bookmarklets","last_synced_at":"2025-08-29T03:40:38.815Z","repository":{"id":214555191,"uuid":"736803313","full_name":"StaticPH/bookmarklets","owner":"StaticPH","description":"Assorted browser bookmarklets I've accumulated","archived":false,"fork":false,"pushed_at":"2024-01-13T04:41:21.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T07:58:39.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StaticPH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-28T23:27:48.000Z","updated_at":"2023-12-28T23:30:37.000Z","dependencies_parsed_at":"2023-12-29T00:26:02.596Z","dependency_job_id":"d1ec093c-6798-4650-8de8-1d0cea242a9e","html_url":"https://github.com/StaticPH/bookmarklets","commit_stats":null,"previous_names":["staticph/bookmarklets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StaticPH%2Fbookmarklets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StaticPH%2Fbookmarklets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StaticPH%2Fbookmarklets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StaticPH%2Fbookmarklets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StaticPH","download_url":"https://codeload.github.com/StaticPH/bookmarklets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241935267,"owners_count":20044826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T02:22:41.854Z","updated_at":"2025-03-04T22:44:46.890Z","avatar_url":"https://github.com/StaticPH.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My bookmarklet collection\nThis repository contains an assortment of (generally trivial) bookmarklets I've written for my own use.\u003cbr\u003e\nSome of these are as simple as changing the current page URL to access it through an alternative view or service.\u003cbr\u003e\nI make no promises regarding the quality, utility, or continued usability of any of these snippets.\u003cbr\u003e\nIn some cases, commented-out code is left in a file, as a reminder to myself of what *doesn't* work; otherwise, comments may be present to explain the intentions of my past-self.\u003cbr\u003e\nRegardless, comments should be block comments that will not interfere with the functionality of the code if included in the bookmark itself.\u003cbr\u003e\nScripts in my repository include their comments and formatting solely for my own convenience, and that will not change.\u003cbr\u003e\nPull requests for improvements or fixes are welcomed.\u003cbr\u003e\n\nNote that some browsers may require bookmarklets to url-encode some characters (spaces, for instance) in order to function. Furthermore, as a security feature, it is common for browsers to strip `javascript:` prefixes from text pasted directly into the address bar.\u003cbr\u003e\n\u003csub\u003eI have also found on a number of ocassions, the browser has converted the \"\u0026lt;\" character in a bookmarklet to the its hexadecimal unicode escape, \u003ccode\u003e\\u003C\u003c/code\u003e.\u003c/sub\u003e\n\n----\n\n## copyPageTitle.js\nSelf-explanatory\n\n## setTabTitle.js\nDisplay an input prompt for a string to use as the tab/window title for the current page, with the input field pre-populated by the current page title.\u003cbr\u003e\nIf an empty string is submitted, the title remains unchanged.\n\n## makeLinksAbsolute.js\nAs the name implies, this will rewrite relative addresses in the `src` and `href` attributes of page elements to use their absolute locations.\u003cbr\u003e\nUnfortunately, there's not much it can do about elements within iframes.\n\n## screwNoSelect.js\nTry various workarounds to take back control over text highlighting and context menu access from pages that have the audacity to take it away from users, even if they are justified in attempting to thwart content theft.\u003cbr\u003e\nFurther work may be needed to restore use of these features by keyboard.\n\n## smashScrollBlockers.js\nFix things some websites do to prevent the user from scrolling.\n\n## getHrefDomains.js\nDisplay a dialog listing all the unique domains found in href attributes of elements in the top-level-document on the current page.\n\n## txtify.js\nView the current page using [txtify.it](https://txtify.it)\n\n## bypassPaywallWith12ft.js\nUse [12ft.io](https://12ft.io) to view the current page without JavaScript.\u003cbr\u003e\nIf a site relies on JavaScript to load in its regular plaintext content (which should really be recognized as a criminal offense by international regulating bodies), this won't be of any use.\n\n## gotoGoogleCachedPage.js\nIf it wasn't clear from the name, this bookmarklet attempts to load a version of the current page previously cached by Google.\n\n## setVideoPlaybackRate.js\nDisplay an input prompt for a floating point number, and apply the submitted number as a playback speed multiplier to all `\u003cvideo\u003e` elements currently on the page.\u003cbr\u003e\nUnless the value is an empty string, in which case the default value of `1.0` is used, behavior is undefined if the submitted value is not a positive number.\n\n## setAudioPlaybackRate.js\nDisplay an input prompt for a floating point number, and apply the submitted number as a playback speed multiplier to all `\u003caudio\u003e` elements currently on the page.\u003cbr\u003e\nUnless the value is an empty string, in which case the default value of `1.0` is used, behavior is undefined if the submitted value is not a positive number.\n\n## twitch_toggle_forced_player_controls.js\nToggle always showing video player controls on twitch.tv\n\n## medium_workaround.js\nUse farside.link to get around Medium's annoying article limit and arbitrarily biased browser detection practices.\n\n----\n### I can't remember where these came from...\n\n#### Get all scripts on the page\n```javascript\njavascript:(function(){s=document.getElementsByTagName('SCRIPT');tx='';sr=[];for(i=0;i\u003cs.length;i++){with(s.item(i)){t=text;if(t){tx+=t;}else{sr.push(src)};}};with(window.open()){document.write('\u003ctextarea id=\"t\"\u003e'+(sr.join(\"\\n\"))+\"\\n\\n-----\\n\\n\"+tx+'\u003c/textarea\u003e\u003cscript src=\"https://beautifier.io/js/lib/beautify.js\"\u003e\u003c/script\u003e\u003cscript\u003ewith(document.getElementById(\"t\")){value=js_beautify(value);with(style){width=\"99%\";height=\"99%\";borderStyle=\"none\";}};\u003c/script\u003e');document.close();}})();\n```\n\n#### Highlight nofollow links\n```javascript\njavascript:var a = document.getElementsByTagName('a');for(var i=0; i\u003ca.length; i++)if (a[i].rel === 'nofollow') {a[i].style.backgroundColor = 'red';a[i].style.fontSize = '2em'; }\n```\n\n#### Edit all the things\n```javascript\njavascript:(function(){document.designMode = 'on'; document.querySelectorAll('*').forEach(function (i){i.setAttribute('contenteditable', 'true')}); void(0);})()\n```\n\n#### Refetch page\nThis fetches the page contents again, and replaces the existing page `body` with the results. That includes duplicating the `head` into the `body`. It's ugly, but sometimes does just the trick to make a page behave itself. (Looking at you, GitHub Docs).\n```javascript\njavascript:(function(){\n\tfetch(document.location.href, {\n\t\t\"credentials\":\"include\",\n\t\t\"headers\":{\n\t\t\t\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n\t\t\t\"accept-language\":\"en-US,en;q=0.9\",\n\t\t\t\"cache-control\":\"no-cache\",\n\t\t\t\"pragma\":\"no-cache\",\n\t\t\t\"upgrade-insecure-requests\":\"1\"\n\t\t},\n\t\t\"referrerPolicy\":\"strict-origin-when-cross-origin\",\n\t\t\"body\":null,\n\t\t\"method\":\"GET\",\n\t\t\"mode\":\"cors\"\n\t}).then(\n\t\tresp =\u003e resp.text().then(html =\u003e document.body.innerHTML = html)\n\t);\n})();\n```\n\n----\n# Other useful things\n- https://imgops.com\n- https://builtwith.com\n- https://selectorgadget.com\n- https://github.com/pomber/git-history\n- https://adrianroselli.com/2015/01/css-bookmarklets-for-testing-and-fixing.html#invert\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaticph%2Fbookmarklets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaticph%2Fbookmarklets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaticph%2Fbookmarklets/lists"}