- Bookmaklet: bookmarklet
- Output:
- Html code:
Sumbmit current URL to Reddit:
var url = document.URL ; var title = document.title ; window.location.href = "https://www.reddit.com/r/" + prompt("Subreddit: ", "") + "/submit?title=" + title + "&url=" + url ;
Submit current URL to Reddit in a new tab
var defaultSub = "dummy" var subreddit = prompt("Enter the subreddit", defaultSub) var baseUrl = 'https://www.reddit.com/r/' + subreddit + 'submit?title='; window.open(baseUrl + document.title + '&url=' + document.URL, '_blank')
Generate org-mode hyperlink
var md = "[[" + document.URL + "][" + document.title + "]]" ; prompt("Enter Ctrl+C to copy this org-mode hyperlink. :", md);
Clear google search URLs to allow easy copy URLs without messing it.
var $s = function (selector){ return Array.from(document.querySelectorAll(selector)); }; $s(".rc a").forEach(e => e.onmousedown = null);
Inject css style sheet from a given URL into current page.
var link = document.createElement("link"); link.href = prompt("css url", ""); link.type = "text/css"; link.rel = "stylesheet"; document.getElementsByTagName("head")[0].appendChild(link);
Open a prompt showing Google driver URL to current document. Useful to create short URL in services like tiny URL and view document in Tablets or Smartphones.
prompt("Google driver URL:", "https://drive.google.com/viewerng/viewer?url=" + document.URL);
Past some URL and open it in Google driver.
var baseUrl = "https://drive.google.com/viewerng/viewer?url="; var url = prompt("Paste Url"); if (url != null){ window.open(baseUrl + url); }
Open page that doesn't exist anymore in Web Archive
var baseUrl = "https://web.archive.org/web/*/" var urlmod = document.URL window.location.href = baseUrl + urlmod