HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<center>
<img src="https://i.imgur.com/NhzwDo3.png" align="right" width="100" /><h1 class="orange"><img src="https://i.imgur.com/AWfUmRH.png" height="50" style="vertical-align: bottom;" class="w3-hover-grayscale" /> Bookmarklets to use on reddit.com</h1>
<h2 class="reddish">Reddit Tricks, shortcuts, tools & 'hacks'.</h2>
<p style="font-size:.9em;"><b class="green">Instructions:</b> <i class="yellow">Drag the bookmarklets into your browser's bookmarks bar - one at a time.</i><br /><b>*EXCEPT MAC OS!!! Mac OS no longer supports drag & drop scripts! :( </b></p>
<p>Some of these work in OLD REDDIT ONLY! A switcher and toggle have been provided. :)</p></center>
<table>
<tr><td><a href="javascript: if(window.location.hostname.includes('reddit')) {
if(document.getElementById('mymenu')) {
document.getElementById('mymenu').remove();
}else{
function switcher(){
var url = location.href;
if (url.includes('www')) {
var url = url.replace('www', 'old');
window.open(url,'_self');
} else if (url.includes('new')) {
var url = url.replace('new', 'old');
window.open(url,'_self');
} else {
var url = url.replace('old', 'www');
window.open(url,'_self');}
}
var switchIt= '<a style=color:#00FF00; href=# onClick=switcher() title=Switch between old and new Reddit>Old/New Reddit</a>';
function upVote(){if(window.location.href.indexOf('old.reddit.com/r/') > -1 || window.location.href.indexOf('old.reddit.com/u/') > -1) {
(function(){var q=[];$('.up').each(function(){var that=this;var f=function(index){$(that).trigger('click');$(that).trigger('mousedown');setTimeout(function(){if(q[index]){q[index](index+1);}else{if(upVoteTimer){window.clearTimeout(upVoteTimer);}}},500);};q.push(f);});var upVoteTimer=window.setTimeout(function(){q[0](1);},50);}());
} else if (window.location.href.indexOf('old.reddit.com/user/') > -1){
void!function(){document.querySelectorAll('[data-event-action=%22upvote%22]').forEach(function(o){%22upvote%22===o.dataset.eventAction%26%26o.click()}),document.querySelectorAll(%22.icon-upvote%22).forEach(function(o){o.click()})}();
} else {
alert('You need to be voting in a single sub or user page in OLD reddit for this to work!\nSWITCH TO OLD REDDIT!\n
Go to: http://old.reddit.com/r/ and choose a subreddit or user to vote on!')
};}
var upVoteIt= '<a style=color:#00FF00; href=# onClick=upVote() title=UpVote All (Works Only in OLD Reddit)>↑ UpVote All</a>';
function downVote(){if(window.location.href.indexOf('old.reddit.com/r/') > -1 || window.location.href.indexOf('old.reddit.com/u/') > -1) {
(function(){var q=[];$('.down').each(function(){var that=this;var f=function(index){$(that).trigger('click');$(that).trigger('mousedown');setTimeout(function(){if(q[index]){q[index](index+1);}else{if(downVoteTimer){window.clearTimeout(downVoteTimer);}}},500);};q.push(f);});var downVoteTimer=window.setTimeout(function(){q[0](1);},50);}());
} else if (window.location.href.indexOf('old.reddit.com/user/') > -1){
void!function(){document.querySelectorAll('[data-event-action=%22downvote%22]').forEach(function(o){%22downvote%22===o.dataset.eventAction%26%26o.click()}),document.querySelectorAll(%22.icon-downvote%22).forEach(function(o){o.click()})}();
} else {
alert('You need to be voting in a single sub in OLD reddit for this to work!\nSWITCH TO OLD REDDIT!\n
Go to: http://old.reddit.com/r/ and choose a subreddit')
};}
var downVoteIt= '<a style=color:#00FF00; href=# onClick=downVote() title=DownVote All(Works Only in OLD Reddit)>↓ DownVote All</a>';
function stealth(){if(window.location.href.indexOf('old.reddit.com') > -1) {
(function(){var newcss='.midcol, .thumbnail, .rank, .flairichtext, .flaircolordark, .linkflairlabel, .flaircolorlight, .res-flairSearch {display:none} .title {color:black !important} .title{font-size:120% !important} body {background-color:white}';
if('\v'=='v'){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement('style');
tag.type='text/css';document.getElementsByTagName('head')[0].appendChild(tag);
tag[(typeof document.body.style.WebkitAppearance=='string')?'innerText':'innerHTML']=newcss}})();document.getElementsByClassName('side')[0].remove();document.getElementById('header').remove();
document.getElementsByClassName('panestack-title')[0].remove();document.getElementsByClassName('menuarea')[0].remove();
document.getElementsByClassName('usertext cloneable')[0].remove();document.getElementsByName('content')[0].remove();
document.getElementsByClassName('footer-parent')[0].remove();
} else if (window.location.href.indexOf('reddit.com') > -1) {
(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll('body *')%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D 'fixed') %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)();
(function(){var e=document.getElementsByClassName('s7pq5uy-6')||('jspfgX');
if(e[0].style.display=='none') {e[0].style.display='block'}else{e[0].style.display='none'}})();
} else {
alert('You need to be on Reddit.com for this bookmarklet to work!\nStealth mode looks best on old.reddit.com!');
};
}
var stealthIt= '<a style=color:#00FF00; href=# onClick=stealth() title=This works best in OLD Reddit>Stealth Mode</a>';
function coder(){(function(){var newcss='.midcol, .thumbnail, .rank, .flairichtext, .flaircolordark, .linkflairlabel, .flaircolorlight, .res-flairSearch {display:none} .title {color:green !important} .title{font-size:120% !important} body {background-color:black}';if('\v'=='v'){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement('style');tag.type='text/css';document.getElementsByTagName('head')[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=='string')?'innerText':'innerHTML']=newcss}})();document.getElementsByClassName('side')[0].remove();document.getElementById('header').remove();document.getElementsByClassName('panestack-title')[0].remove();document.getElementsByClassName('menuarea')[0].remove();document.getElementsByClassName('usertext cloneable')[0].remove();document.getElementsByName('content')[0].remove();document.getElementsByClassName('footer-parent')[0].remove();}
var coderIt= '<a style=color:#00FF00; href=# onClick=coder() title=This only works in OLD Reddit>Coder Mode</a>';
function baseTag(){var insertBase;
var baseTag;
insertBase = document.createElement('base');
insertBase.id = 'myBase';
insertBase.innerHTML ='<base target=_blank>';
container_block = document.getElementsByTagName('head')[0];
container_block.appendChild(insertBase);
}
var NewTabIt= '<a style=color:#00FF00; href=# onClick=baseTag();return false; title=Opens all links in a new tab when clicked>OpenInNewTab</a>';
function getVid(){var url = location.href; if (url.includes('old')) {
var url = url.replace('old', 'www');
} (window.open('https://redv.co/?url='+url));};
var downloadVid= '<a style=color:#00FF00; href=# onClick=getVid(); title=Download Reddit Videos>GetRedditVideo</a>';
if (window.location.href.includes('old')) {
var notice='';
var spacer='<span style=color:#777>.......</span>';
} else {
var notice='<br /><sub><br /><i style=font-style:italic;color:#00FFFF;cursor:pointer><a onClick=makeOld() id=demo onMouseOver=replaceText() onMouseOut=original()>This works best<br />in OLD REDDIT</a></i></sub>';
var spacer='<span style=color:#777>..........</span>';
}
function hideMenu() { document.getElementById('mymenu').remove(); };
function replaceText() {
document.getElementById('demo').innerHTML = ' Click to switch <br />to OLD REDDIT';
}
function original() {
document.getElementById('demo').innerHTML = 'This works best<br />in OLD REDDIT';
}
function makeOld(){
var url=document.location.href;
var url = url.replace('www', 'old');
var url = url.replace('new', 'old');
window.open(url,'_self');
}
function infoPop(){var a='<div style:padding:10px;><img src=http://reddit.com/favicon.ico /><br />
<h2>Welcome to the Reddit Toolkit!</h2>
<ul>
<li>Upvote all will up vote all all of the posts on a subreddit or even of an individual user. This will work even for subs that you are not subscribed to!<br />
<i style=color:red>CAVEAT! Be careful - Reddit keeps counts of total votes on a sub and user pages. Overuse will mean your votes will not be counted. Abuse can get you shadowbanned!</i></li>
<li>Downvote all will down vote all all of the posts on a subreddit or even of an individual user. This will work even for subs that you are not subscribed to!<br />
<i style=color:red>CAVEAT! - See above!</i></li>
<li>Old/New Reddit toggle. This will toggle between old and new Reddit. Most of these tools ONLY work in Old Reddit.</li>
<li>Stealth Mode. This will hide much of the graphics and headers/footers that give away the fact that you are surfing Reddit. Often used by people who are at work.</li>
<li>Coder Mode. Looks like you have some kind of coding interface open. Another way of reading Reddit when you are supposed to be doing something else!</li>
<li>OpenInNewTab. Clicking this will not make any visible changes on the page, however, all of the links you click on will open in a new tab!</li>
<li>GetRedditVideo - This will open an interface that will let you download a Reddit hosted video.</li>
</ul><center><h2><a href=https://www.zazzle.com/cats_and_dogs/products>Cat Tax</a></h2></center></div>';
w=window.open('','Links','scrollbars,resizable,width=400,height=675');
w.document.write(a);}
var block_to_insert;
var container_block;
block_to_insert = document.createElement('div');
block_to_insert.id = 'mymenu'; block_to_insert.innerHTML = '<a href=# onclick=hideMenu() title=Close style=font-weight:bold;color:#F00>×</a>' + spacer +'<a href=https://www.zazzle.com/cats_and_dogs/products><img src=https://www.reddit.com/favicon.ico height=15 width=15 /></a>' + spacer + '<a href=# onClick=infoPop() style=color:#FFF;font-weight:bold;size:150%; title=Information>ⓘ</a>
<br /><hr />' + upVoteIt + '<br /><hr />'+ downVoteIt +'<br /><hr />'+switchIt+'<br /><hr />' + stealthIt + '<br /><hr />' + coderIt + '<hr/>'+ NewTabIt + '<br /><hr />' + downloadVid + notice;
container_block = document.getElementsByTagName('body')[0];
container_block.appendChild(block_to_insert);
mymenu.setAttribute('style', 'height:240px; width:100px; border-radius:0px 0px 10px 0px; background-color:#000; color:red; float:left; font-size:12px; z-index:10000; display:block; overflow:visible; position:fixed; top: 0; padding:2px 5px;');
}
} else {
alert('NOT REDDIT\nThis tool only works on Reddit.\nRedirecting you to Reddit.com');
window.open('http://old.reddit.com','_self');
};" class="button" title="Reddit Toolkit">Reddit Toolkit</a></td><td>Dropdown menu for Reddit with cool tools!<br />
<i class="gray">Bulk UpVote/Downvote, switch from old to new Reddit, Stealth mode, etc.</i></td></tr>
<tr><td>
<a href='javascript: var url = location.href; var url = url.replace("www", "old"); window.open(url,"_self")' title="Switch to Old Reddit (Enables mass voting)">𝔒𝔩𝔡𝔢</a></dt>
</td><td>Converts to old reddit. This enables the two arrow buttons below which allow mass voting.<br />
The mass voter will even work on subs you do not subscribe to.</td></tr>
<tr><td>
<dt><a href='javascript:var url = location.href; if (url.includes("www")) { var url = url.replace("www", "old"); window.open(url,"_self") } else { var url = url.replace("old", "www"); window.open(url,"_self") }' title="Toggle From Old to New Reddit">RToggle</a></dt>
</td><td>Toggles to old reddit and back to New Reddit.<br /><i class="gray">This bookmarklet will toggle back and forth</i> </td></tr>
<tr><td>
<dt><a href='javascript: if(window.location.href.indexOf("old.reddit.com/r/") > -1) {
(function()%7Bvar q%3D%5B%5D%3B%24(%27.up%27).each(function()%7Bvar that%3Dthis%3Bvar f%3Dfunction(index)%7B%24(that).trigger(%27click%27)%3B%24(that).trigger(%27mousedown%27)%3BsetTimeout(function()%7Bif(q%5Bindex%5D)%7Bq%5Bindex%5D(index%2B1)%3B%7Delse%7Bif(upVoteTimer)%7Bwindow.clearTimeout(upVoteTimer)%3B%7D%7D%7D,500)%3B%7D%3Bq.push(f)%3B%7D)%3Bvar upVoteTimer%3Dwindow.setTimeout(function()%7Bq%5B0%5D(1)%3B%7D,50)%3B%7D())%3B
} else {
alert("You need to be voting in a single sub in OLD reddit for this to work!\nSWITCH TO OLD REDDIT!\n
Go to: http://old.reddit.com/r/ and choose a subreddit")
}' title="Upvote ALL on the current page">⬆</a></dt> </td><td> Upvotes ALL on the current page. <span class="red">Old Reddit Only.</span><br /><i class="gray">The mass voter works in Subreddits - not for voting on Redditors.</i></td></tr>
<tr><td>
<dt><a href='javascript: if(window.location.href.indexOf("old.reddit.com/r/") > -1) {
(function()%7Bvar q%3D%5B%5D%3B%24(%27.down%27).each(function()%7Bvar that%3Dthis%3Bvar f%3Dfunction(index)%7B%24(that).trigger(%27click%27)%3B%24(that).trigger(%27mousedown%27)%3BsetTimeout(function()%7Bif(q%5Bindex%5D)%7Bq%5Bindex%5D(index%2B1)%3B%7Delse%7Bif(downVoteTimer)%7Bwindow.clearTimeout(downVoteTimer)%3B%7D%7D%7D,500)%3B%7D%3Bq.push(f)%3B%7D)%3Bvar downVoteTimer%3Dwindow.setTimeout(function()%7Bq%5B0%5D(1)%3B%7D,50)%3B%7D())%3B
} else {
alert("You need to be voting in a single sub in OLD reddit for this to work!\nSWITCH TO OLD REDDIT!\n
Go to: http://old.reddit.com/r/ and choose a subreddit")
}' title="Downvote ALL on the current page">⬇</a></dt>
</td><td>Downvotes ALL on the current page. <span class="red">Old Reddit Only.</span><br /><i class="gray">The mass voter works in Subreddits - not for voting on Redditors.</i></td></tr>
<tr><td><a class="button" href="javascript:void%20!function(){document.querySelectorAll('[data-event-action=%22upvote%22]').forEach(function(o){%22upvote%22===o.dataset.eventAction%26%26o.click()}),document.querySelectorAll(%22.icon-upvote%22).forEach(function(o){o.click()})}();" title="Mass UpVoter">☆ UpVoter</a></td><td>Mass UpVoter. BAM → This one upvotes everything instantly. Multiple times too.<br />
<i class="gray">Use this frequently to get shadowbanned!</i></td></tr>
<tr><td><a class="button" href="javascript:void%20!function(){document.querySelectorAll('[data-event-action=%22downvote%22]').forEach(function(o){%22downvote%22===o.dataset.eventAction%26%26o.click()}),document.querySelectorAll(%22.icon-downvote%22).forEach(function(o){o.click()})}();" title="Mass Downvoter">💣 Downvoter</a></td><td>Mass Downvoter. BAM → This thing downvotes everything instantly. Multiple times too.<br />
<i class="gray">Use this frequently to get shadowbanned!</i></td></tr>
<tr><td>
<dt><a href='javascript:(function(){var newcss=".midcol, .thumbnail, .rank, .flairichtext, .flaircolordark, .linkflairlabel, .flaircolorlight, .res-flairSearch, .BlueBar, .ProfileTemplate__sidebar, .Post__thumbnail {display:none} .title {color:black !important} .title{font-size:120% !important} body {background-color:white}";if("\v"=="v"){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=newcss}})();document.getElementsByClassName("side")[0].remove();document.getElementById("header").remove();document.getElementsByClassName("panestack-title")[0].remove();document.getElementsByClassName("menuarea")[0].remove();document.getElementsByClassName("usertext cloneable")[0].remove();document.getElementsByName("content")[0].remove();document.getElementsByClassName("footer-parent")[0].remove();' title="Hide that you are on Reddit">Stealth Reddit</a></dt>
</td><td>Super Stealth mode Reddit hides much of the styles of Reddit so nobody knows what site it is.<br /><i>You must first switch to Old Reddit (Use the olde button above!)</i></td></tr>
<tr><td>
<dt><a href='javascript:(function(){var newcss=".midcol, .thumbnail, .rank, .flairichtext, .flaircolordark, .linkflairlabel, .flaircolorlight, .res-flairSearch {display:none} .title {color:green !important} .title{font-size:120% !important} body {background-color:black}";if("\v"=="v"){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=newcss}})();document.getElementsByClassName("side")[0].remove();document.getElementById("header").remove();document.getElementsByClassName("panestack-title")[0].remove();document.getElementsByClassName("menuarea")[0].remove();document.getElementsByClassName("usertext cloneable")[0].remove();document.getElementsByName("content")[0].remove();document.getElementsByClassName("footer-parent")[0].remove();' title="Hide that you are on Reddit by using a coder style">Coder Reddit</a></dt> </td><td class="green">Coder Reddit puts green text on a black background and looks like you're coding.<br />It shrinks titles and removes flairs and thumbnails for surfing Reddit at work!</td></tr>
<tr><td>
<a href='javascript: if(window.location.href.indexOf("old.reddit.com") > -1) {
(function(){var newcss=".midcol, .thumbnail, .rank, .flairichtext, .flaircolordark, .linkflairlabel, .flaircolorlight, .res-flairSearch {display:none} .title {color:black !important} .title{font-size:120% !important} body {background-color:white}";
if("\v"=="v"){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement("style");
tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);
tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=newcss}})();document.getElementsByClassName("side")[0].remove();document.getElementById("header").remove();
document.getElementsByClassName("panestack-title")[0].remove();document.getElementsByClassName("menuarea")[0].remove();
document.getElementsByClassName("usertext cloneable")[0].remove();document.getElementsByName("content")[0].remove();
document.getElementsByClassName("footer-parent")[0].remove();
} else if (window.location.href.indexOf("reddit.com") > -1) {
(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll("body *")%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D "fixed") %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)();
(function(){var e=document.getElementsByClassName("s7pq5uy-6")||("jspfgX");
if(e[0].style.display=="none") {e[0].style.display="block"}else{e[0].style.display="none"}})();
} else {
alert("You need to be on Reddit.com for this bookmarklet to work!\nStealth mode looks best on old.reddit.com!");
}' title="Cleanup - Old or New Reddit">Cleanup All Reddit</a>
</td><td>This cleans up the look of both old and new Reddit for a quick stealth mode.</td></tr>
<tr><td>
<dt><a href='javascript:(function(){var e=document.getElementsByClassName("side");if(e[0].style.display=="none") {e[0].style.display="block"}else{e[0].style.display="none"}})()' title="Remove the sidebar from Reddit">Remove Sidebar</a></dt> </td><td>Removes the sidebar from Old Reddit</td></tr>
<tr><td>
<a href='
javascript:(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll("body *")%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D "fixed") %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)();
(function(){var e=document.getElementsByClassName("s7pq5uy-6")||("jspfgX");
if(e[0].style.display=="none") {e[0].style.display="block"}else{e[0].style.display="none"}})()' title="Removes the sticky header & sidebar in New Reddit">Cleanup New Reddit</a>
</td>
<td>Clean mode for New Reddit</td></tr>
<tr><td>
<dt><a href='javascript:document.getElementsByClassName("side")[0].remove();
document.getElementById("header").remove();
document.getElementsByClassName("panestack-title")[0].remove();
document.getElementsByClassName("menuarea")[0].remove();
document.getElementsByClassName("usertext cloneable")[0].remove();
document.getElementsByName("content")[0].remove();' title="Hide that you are on Reddit">Clean Reddit</a></dt>
</td><td>Cleans up the Old Reddit CSS so you can browse in stealth mode</td></tr>
<tr><td><a class="button" href="javascript:(function()%7Blocation.href='http://reddit.com/submit?url='+location.href+'&title='+encodeURIComponent(document.title)%7D)()
" title="Post to Reddit">PostToReddit</a></td><td>Posts the page you are currently on to Reddit.<br /><i class="gray">You simply need to select which sub you want it to post to.</i></td></tr>
<tr><td>
<dt><a href='javascript:(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll("body *")%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D "fixed") %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()' title="Kill that annoying sticky">Kill Sticky</a>
</dt> </td> <td>Kill that annoying sticky at the top of the screen (or bottom)<br /><i class="gray">This also works for Quora</i></td>
</tr><tr>
<td>
<dt><a href='javascript:(()=>{var a=document.querySelectorAll.bind(document),b="forEach",c="state_",d="disabled",e="display",f="type",g="text",h=(l,n,d,o,p,q)=>{if(n===e)l=l.style;o=n+"_org";p=f+"_org";if(!(c in l)){l[c]=0;l[o]=l[n];l[p]=l[f]}q=l instanceof HTMLInputElement;if(l[c]=!l[c]){l[n]=d;if(q&&(l.type==="hidden"))l[f]=g}else{l[n]=l[o];if(q)l[f]=l[p];delete l[c];delete l[o];delete l[p]}};a("link[rel=stylesheet],style")[b]((l)=>{h(l,d,1)});a("button,input,select")[b]((l)=>{h(l,d,0)});a("*")[b]((l)=>{h(l,e,"")});return})()' title="Toggle CSS">ToggleCSS</a></dt>
</td><td>Toggle the CSS on or off<br /><i class="gray">This does not replace the CSS with anything, but you can start with this and build your own!</i></td></tr>
<tr><td><dt><a href="javascript: (function() {
u = location.href;
if (u.match('reddit\.com')) {
if (u.match('www\.reddit')) {
u = u.replace('www\.reddit', 'old.reddit')
} else {
u = u.replace('old\.reddit', 'www.reddit')
}
window.location = u;
} else {
alert('Not a Reddit URL.')
}
})()">New/Old Toggle2</a></dt></td><td>Toggle between New & Old Reddit.<br /><i class="gray">Another way of toggling between New & Old Reddit (using functions)</i></td></tr>
<tr><td><a class="button" href="javascript: (open('https://redv.co/?url='+encodeURIComponent(document.location)))
" title="Download Reddit Video">Download Reddit Video</td><td>Download a video from Reddit.<br /> <i class="gray">Go to the page with the video, then click to download it from Reddit!</i></td></tr>
<tr><td><a class="button" href="javascript:var json_obj;
$.getJSON('.json', function (data) {
json_obj = data;
});
str = (JSON.stringify(json_obj));
var start_pos = str.indexOf('fallback_url') + 1;
var end_pos = str.indexOf('?',start_pos);
var text_to_get = str.substring(start_pos,end_pos);
var vidSource= text_to_get.replace('allback_url':'','');
window.open(vidSource);" title="Direct Video Download From Reddit Video">RedVidGrab</a></td><td>Direct Video Download from Reddit Video<br /><i class="gray">Old or New Reddit. Uses jQuery to grab URL - right click to download!</i></td></tr>
<tr><td><a class="button" href="javascript:var%20haystack%3D%20document.body.innerHTML%3B%20%0Ahaystack%3Dhaystack.toString().trim()%3B%20%0Avar%20needle%20%3D%20%2F%5Cs*(%5B%22%27%5D)(%5C%2Fuser%5C%2F.%2B%3F)%5C1%2Fig%3B%20%0Avar%20found%20%3D%20haystack.match(needle)%3B%20%0Afunction%20removeDupes(found)%20%7B%20%0Alet%20unique%20%3D%20%7B%7D%3B%20%0Afound.forEach(function(i)%20%7B%20%0Aif(!unique%5Bi%5D)%20%7B%20unique%5Bi%5D%20%3D%20true%3B%20%7D%20%7D)%3B%20%0Areturn%20Object.keys(unique)%3B%20%0A%7D%20%0Afound%3DremoveDupes(found)%3B%20%0Afound%20%3D%20found.sort()%3B%0A%0Afound.sort(function%20(a%2C%20b)%20%7B%0A%20%20%20%20return%20a.toLowerCase().localeCompare(b.toLowerCase())%3B%0A%7D)%3B%0A%0Avar%20baseUrl%3D%27http%3A%2F%2Fwww.reddit.com%27%3B%0Avar%20text%20%3D%20%27%27%3B%0Avar%20i%3B%0Afor%20(i%20%3D%200%3B%20i%20%3C%20found.length%3B%20i%2B%2B)%20%7B%0A%20found%5Bi%5D%20%3D%20found%5Bi%5D.replace(%2F%5B%27%27%5D%2Fgi%2C%27%27)%3B%0A%20text%20%2B%3D%20%20found%5Bi%5D.replace(%2F%5B%22%5D%2Fgi%2C%27%27).link(baseUrl%2B%20found%5Bi%5D.replace(%2F%5B%22%5D%2Fgi%2C%27%27))%20%2B%20%27%3Cbr%3E%27%3B%0A%7D%0Aif(found%20!%3D%3D%20null%20%26%26%20found%20!%3D%3D%27%27)%20%7B%20%0Aw%3Dwindow.open(%27%27%2C%27users%27%2C%27scrollbars%2Cresizable%2Cwidth%3D400%2Cheight%3D600%27)%3B%20w.document.write(%27%3Chtml%3E%3Chead%3E%3Ctitle%3EReddit%20Users%3C%2Ftitle%3E%3C%2Fhead%3E%3Cbody%3E%27%20%2B%20text)%3B%20%0A%7Delse%7B%20%0Aalert(%27No%20Reddit%20users%20found%20on%20this%20page%27)%3B%20%0A%7D" title="find all usernames of users in sub">getUsers</a></td><td>Shows a popup with all of the users in a sub.<br /><i class="gray">Generates a sorted, hyperlinked list with all duplicates removed.</i></td></tr>
<tr><td><a class="button" href="javascript:var page=document.getElementsByTagName('title')[0].innerHTML;
open('https://www.reddit.com/search?q='+page);" title="Search for similar posts">SearchSimilar</a></td><td>Searches Reddit for similar content to the current page<br /><i class="gray">Find similar content quickly.</i></td></tr>
</table>
<hr />
<h2> So how do you use these things?</h2>
<p>
Just drag the bookmarklet to your browser's bookmarks bar.
<p>
If you want to downvote or upvote all of the posts, first you must convert to "OLD Reddit" by clicking on the "𝔒𝔩𝔡𝔢" bookmarklet.<p>
Then you merely click either the up or down button.<p>
That's it! 😉
* {
font-family: arial;
background-color: black;
color: white;
}
a {
margin:4px;
-moz-box-shadow: 3px 2px 0px 0px #8a2a21;
-webkit-box-shadow: 3px 4px 0px 0px #8a2a21;
box-shadow: 3px 4px 0px 0px #8a2a21;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #c62d1f), color-stop(1, #f08738));
background:-moz-linear-gradient(top, #c62d1f 5%, #f08738 100%);
background:-webkit-linear-gradient(top, #c62d1f 5%, #f08738 100%);
background:-o-linear-gradient(top, #c62d1f 5%, #f08738 100%);
background:-ms-linear-gradient(top, #c62d1f 5%, #f08738 100%);
background:linear-gradient(to bottom, #c62d1f 5%, #f08738 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c62d1f', endColorstr='#f08738',GradientType=0);
background-color:#c62d1f;
-moz-border-radius:18px;
-webkit-border-radius:18px;
border-radius:18px;
border:1px solid #d02718;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:17px;
padding:7px 25px;
text-decoration:none;
text-shadow:0px 1px 0px #810e05;
}
a:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f08738), color-stop(1, #c62d1f));
background:-moz-linear-gradient(top, #f08738 5%, #c62d1f 100%);
background:-webkit-linear-gradient(top, #f08738 5%, #c62d1f 100%);
background:-o-linear-gradient(top, #f08738 5%, #c62d1f 100%);
background:-ms-linear-gradient(top, #f08738 5%, #c62d1f 100%);
background:linear-gradient(to bottom, #f08738 5%, #c62d1f 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f08738', endColorstr='#c62d1f',GradientType=0);
background-color:#f08738;
}
a:active {
position:relative;
top:1px;
}
.green {color:#0F0}
.orange {color:#FF7F50}
.w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)}
.red {color:red}
table {
margin-left:auto;
margin-right:auto;
text-align:left;
table-border:0px #fff;
border-collapse: collapse;
}
th {font-size:170%; color:#0FF; text-align:center;}
th.reddit {color:#c62d1f;}
.reddish{color:#c62d1f;}
.gray {color:#888}
.yellow{color:#f1f442}
Also see: Tab Triggers