Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

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.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h2>Media & Multimedia Bookmarklets</h2>
<p class="red"><i>Just drag & Drop the red bookmarklet(s) of your choice to your bookmarks bar.</i></p>
<table class="center">
  <tr><th colspan="2">Media & Multimedia Bookmarklets</th></tr>
      <tr><td>
             <a class="button" href='javascript:
if(window.location.href.indexOf(%22ft.com%22) > -1) {
(function () {
var cookies = document.cookie.split(%22; %22);
for (var c = 0;
c < cookies.length; c++) {
 var d = window.location.hostname.split(%22.%22);
  while (d.length > 0) {
   var cookieBase = encodeURIComponent(cookies[c].split(%22;%22)[0].split(%22=%22)[0]) + %22=;
   expires=Thu, 01-Jan-1970 00:00:01 GMT;
   domain=%22 + d.join(%22.%22) + %22 ;
   path=%22;
   var p = location.pathname.split(%22/%22);
   document.cookie = cookieBase + %22/%22;
   while (p.length > 0) { document.cookie = cookieBase + p.join(%22/%22);
   p.pop();
   };
   d.shift();
   }}})();
   window.location.href=%22https://m.facebook.com/l.php?u=%22+encodeURIComponent(window.location.href)+%22?ClearCache=true%22;
   alert(%22To read FT.com, we must redirect you through FaceBook!%22);
   } else if (window.location.href.indexOf(%22wsj.com%22) > -1 || window.location.href.indexOf(%22technologyreview.com%22) > -1 || window.location.href.indexOf(%22investors.com%22) > -1 || window.location.href.indexOf(%22businessinsider.com%22) > -1) {
   (function()%7Bwindow.location.href %3D %22https%3A%2F%2Foutline.com%2F%22 %2B window.location.href%7D)();
   } else {
   (function () { var cookies = document.cookie.split(%22; %22);
   for (var c = 0; c < cookies.length; c++) {
   var d = window.location.hostname.split(%22.%22);
   while (d.length > 0) {
   var cookieBase = encodeURIComponent(cookies[c].split(%22;%22)[0].split(%22=%22)[0]) + %22=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=%22 + d.join(%22.%22) + %22 ;
   path=%22;
   var p = location.pathname.split(%22/%22);
   document.cookie = cookieBase + %22/%22;
   while (p.length > 0) {
   document.cookie = cookieBase + p.join(%22/%22);
   p.pop();
   };
   d.shift();}}})();window.localStorage.clear();
   window.open(document.location + %22?ClearCache=true%22, %22_self%22);}
' title="Paywall Killer - get around many paywalls">💀	Paywall Killer</a>
          </td><td>Get around most if not all paywalls.<br><i class="gray">Read your favorite online magazines and newspapers for free.</td></tr>
  <tr><td>
<a class="button" href="javascript: var song=window.prompt('Find Music:', 'Enter song or artist name'); 
var song2=song.split(' ').join('_');
var song3=song.split(' ').join('');
var url='https://www.google.com/search?q=%22parent+directory%22+mp3+OR+wma+OR+ogg+OR+wav+%22' + song +'%22 OR %22' + song2 + '%22 OR %22' + song3 + '%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0';
window.open(url,'_self')" title="Find Music Online">🔎♪Music♬</a>
    </td><td>Find music on the internet with this bookmarklet.<br /><i class="gray">Search for directories of music online from any page.</i></td></tr>
<tr><td>
  <a class="button" href="javascript: var song=window.prompt('Find Movies:', 'Enter movie or film title'); 
var song2=song.split(' ').join('_');
var song3=song.split(' ').join('');
var url='https://www.google.com/search?q=%22parent+directory%22+mp4+OR+AVI+OR+WMV+OR+MOV+OR+FLV+%22' + song +'%22 OR %22' + song2 + '%22 OR %22' + song3 + '%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0';window.open(url,'_self');" title="Find Movies Online">🎥 Movie Search</a>
  </td><td>Find movies online<br /><i class="gray">Search for directories of movies online from any page.</i></td></tr>

  <tr><td><a class="button" href="javascript:
if (document.URL.indexOf('imdb.com/title/') > -1) { 
var film = document.getElementsByTagName('H1')[0].innerText;
var film2=film.split(' ').join('_');var film3=film.split(' ').join('');var url='https://www.google.com/search?q=%22parent+directory%22+mp4+OR+AVI+OR+WMV+OR+MOV+OR+FLV+%22' + film +'%22 OR %22' + film2 + '%22 OR %22' + film3 + '%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0';window.open(url,'_self');
} else {
alert('You must be on an IMDB page for this tool!\nRedirecting you now... try again!');
open('https://www.imdb.com/title/tt0031381/?ref_=nv_sr_1');
}" title="Find an IMDB Movie">🎥 Find IMDB Movie</a></td><td>Find a movie on the IMDB.com site<br />
<i class="gray">Then click this bookmarklet to find it on the web!</td></tr>  
  
  
 <tr><td><a class="button" href='javascript:if(window.location.href.indexOf("youtube.com") > -1 || window.location.href.indexOf("youtu.be") > -1) {   (function(){window.location.href = "https://ymp4.download/en2/?url=" + window.location.href})();  } else if (window.location.href.indexOf("reddit.com") > -1) {   (function(){window.location.href = "https://viddit.red/?url=" + window.location.href})();   } else if (window.location.href.indexOf("twitter.com") > -1 ){(function(){window.location.href = "https://www.savetweetvid.com/downloader?url=" + window.location.href})();   }else if (window.location.href.indexOf("vidmax.com") > -1 ){(function(){window.location.href = "https://9xbuddy.org/process?url=" + window.location.href})();   }else if (window.location.href.indexOf("liveleak.com") > -1 ){(function(){window.location.href = "https://www.tubeoffline.com/downloadFrom.php?host=LiveLeak&video=https%3A%2F%2F" + window.location.href})();   }else if (window.location.href.indexOf("dailymotion.com") > -1 ){(function(){window.location.href = "https://dmvideo.download/?url=" + window.location.href})();   }else if (window.location.href.indexOf("metacafe.com") > -1 ){(function(){window.location.href = "https://keepv.id/?url=" + window.location.href})();   }else {(function(){window.location.href = "https://keepv.id/?url=" + window.location.href})();   }' title="Video Downloader">GetVideo</a></td><td>Download videos from popular sites<br /><i class="gray">Will download videos from YouTube, Facebook, Twitter, Reddit, MetaCafe, DailyMotion, Liveleak, etc.</i></td></tr>   
  
  <tr><td><a class="button" href='javascript:window.location=document.URL.replace("https://www.youtube.com/watch?v=","https://y2mate.com/youtube/");' title="YouTube Download">YouTubeDownLoad</a></td><td>Download YouTube Video<br /><i class="gray">Download videos from YouTube with this bookmarklet.</i></td></tr>
  <tr><td>
  <a class="button" href='javascript:window.location=document.URL.replace("https://www.youtube.com/watch?v=","https://ytmp3.com/download/");' title="Download MP3 from YouTube Video">▽ YouTube2MP3</a></td><td>Grab an MP3 music file from a YouTube video.</td></tr>
  <tr>
    <td>
  <a class="button" href="javascript: var song=window.prompt('Find Books:', 'Enter book or author name'); 
var song2=song.split(' ').join('_');
var song3=song.split(' ').join('');
var url='https://www.google.com/search?q=%22parent+directory%22+pdf+OR+epub+OR+DjVU+OR+xps+%22' + song +'%22 OR %22' + song2 + '%22 OR %22' + song3 + '%22+-html+-htm+-shtml+-phtml+-php+-buy+-aspx+-jsp+-asp+-cgi+-pdf+-ftp+-unknownsecret&num=100&filter=0';
window.open(url,'_self')" title="Find books Online">🔎 📖eBook Search</a>
    </td><td>This will search for books across the Internet via a Google script.<br /><i class="gray">Generic book search using Google.</i></td></tr>
    <tr><td>
  <a class="button" href='javascript:
var ebookcheck = document.getElementById(%22ebooksProductTitle%22);
var bookcheck = document.getElementById(%22productTitle%22);
if(ebookcheck !=null){ 
var book= document.getElementById(%22ebooksProductTitle%22).innerText;
(open(%22https://archive.org/search.php?query=%22+book));
}else if(bookcheck !=null){
var book= document.getElementById(%22productTitle%22).innerText;
(open(%22https://archive.org/search.php?query=%22+book));
} else {
var book=window.prompt(%22Find Free Books:%22, %22Enter the book title%22); 
if(book == "Enter the book title" || book == null){
alert("Enter a book title or find one on Amazon");
} else {
(open(%22https://archive.org/search.php?query=%22+book));
}}' title="Finds books & eBooks on Amazon elsewhere">📖 Amazon Book Finder</a></td><td>This bookmarklet will find a book you selected on Amazon.com online for free!<br /><i class="gray">Go to the page of any book on Amazon, then click this bookmarklet!</i></td></tr>
 <tr><td><a class="button" href='javascript:if(window.location.href.indexOf("tunein.com/radio") > -1) { var muzyk = document.getElementById("jp_audio_0").src; (open(muzyk)); var title = document.getElementById("jp_audio_0").title; alert(title+"Was opened in a new window"); } else { alert("You need to be streaming Music on the TuneIn.com page for this to work!") }' title="Open TuneIn URL">🔗	Open TuneIn URL</a></td><td>Grab the URL from any TuneIn station and open it in a new window.</td></tr> 
 
        <tr><td>
          <a class="button" href='javascript:(function()%7Bwindow.open(  "http%3A%2F%2Fweb.archive.org%2Fweb%2F*%2F" %2B document.domain)%7D)()' add_date="1461250448">&#128452; WaybackMachine</a></td><td>Find an archived version of the page you are on. (Pre paywall?)<br />
          <i class="gray">Can't find that page? Did they put up a paywall? Try the Wayback Machine...</i></td></tr>
  <tr><td><a class="button" href="javascript:window.location%20=%20'https://webcache.googleusercontent.com/search?q=cache:'+window.location;" title="Find page in Google Cache">&#128194; Google Cache</a></td><td>Find a cached version of the current page.<br />
    <i class="gray">Looking for a cached version of a page? Try this.</i></td></tr><tr><td><a class="button" href="javascript:void(open('https://archive.today/?run=1&url='+encodeURIComponent(document.location)))" title="Archive the current page">Archive Page</a></td><td>Creates an archive of the current page.<br /><i class="gray">Often, this may get you around a paywall.</i></td></tr>
<tr><td><a class="button" href="javascript:(function()%7Bwindow.location.href %3D 'https%3A%2F%2Foutline.com%2F' %2B window.location.href%7D)()" title="Outline Page">Outline Page</a></td><td>Outlines the page by removing all ads and decoration.<br />
  <i class="gray">Another way around paywalls</i></td></tr>
<tr><td><a class="button" href="javascript: if(window.location.href.indexOf('ft.com') > -1) { var pageTitle=document.getElementsByClassName('barrier__heading-serif')[0].innerHTML; } else { var pageTitle=document.getElementsByTagName('title')[0].innerText; } var host=(window.location.hostname); var host=host.replace('www.',''); var pageTitle = pageTitle.toString(); var twit= 'https://twitter.com/search?q=' + host + ' '+ pageTitle + '&src=typd'; window.open(twit, '_self');" title="Go to the page via Twitter Referrer">TwitterRefer</a></td><td>Twitter Referrer<br />
    <i class="gray">Enter a site via Twitter. (Paywall avoidance tactic)</i></td></tr>
  
  <tr><td><a class="button" href='javascript:(function () { var cookies = document.cookie.split("; "); for (var c = 0; c < cookies.length; c++) { var d = window.location.hostname.split("."); while (d.length > 0) { var cookieBase = encodeURIComponent(cookies[c].split(";")[0].split("=")[0]) + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=" + d.join(".") + " ;path="; var p = location.pathname.split("/"); document.cookie = cookieBase + "/"; while (p.length > 0) { document.cookie = cookieBase + p.join("/"); p.pop(); }; d.shift(); } } })(); window.location.href="https://m.facebook.com/l.php?u="+encodeURIComponent(window.location.href)+"?ClearCache=true"; 
    ' title="Use FaceBook Referrer">FB&rarr;</a></td><td>Reload the page via a Facebook referrer.<br />
    <i class="gray">This enters the page via Facebook; which may circumvent a paywall</i></td></tr> 
  
  <tr><td><a href='javascript:(function () { var cookies = document.cookie.split("; "); 
for (var c = 0; c < cookies.length; c++) { 
var d = window.location.hostname.split("."); 
while (d.length > 0) { 
var cookieBase = encodeURIComponent(cookies[c].split(";")[0].split("=")[0]) + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=" + d.join(".") + " ;path="; var p = location.pathname.split("/"); 
document.cookie = cookieBase + "/"; 
while (p.length > 0) { 
document.cookie = cookieBase + p.join("/"); 
p.pop(); }; d.shift(); } } })();
window.localStorage.clear();
window.open(document.location + "?ClearCache=true", "_self");' title="CookieKiller" class="button">💣CookieBomb</a></td><td>Kills all site, domain and path cookies.<br /><i class="gray">Then it clears the cache and reloads the page! Magic!</i></td></tr>
  <tr><td><a class="button" href="javascript:
if(window.location.href.indexOf('wsj.com') > -1) { 
(function () { var cookies = document.cookie.split('; '); for (var c = 0; c < cookies.length; c++) { var d = window.location.hostname.split('.'); while (d.length > 0) { var cookieBase = encodeURIComponent(cookies[c].split(';')[0].split('=')[0]) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path='; var p = location.pathname.split('/'); document.cookie = cookieBase + '/'; while (p.length > 0) { document.cookie = cookieBase + p.join('/'); p.pop(); }; d.shift(); } } })(); 
window.localStorage.clear();
var block_to_insert ; 
var container_block ; 
var outline= '<a href=https://outline.com/' + window.location.href + '> &nbsp;Outline WSJ Article</a>';
var pageTitle=document.getElementsByTagName('title')[0].innerText; 
var pageTitle = pageTitle.toString();
var pageTitle = pageTitle.replace(/ /g, '&nbsp;');
var pageTitle = pageTitle.replace(/WSJ/g, '');
var gogoog= 'https://www.google.com/search?q=site:wsj.com/articles/&nbsp;' + pageTitle;
var go2='<a href=' + gogoog + '> &nbsp;Via Google referrer</a>';
var twit= 'https://twitter.com/search?q=' + pageTitle + '&src=typd';
var gotwit='<a href=' + twit + '> &nbsp;Via Twitter referrer</a>';
block_to_insert = document.createElement('div'); 
block_to_insert.id = 'mymenu'; 
block_to_insert.innerHTML = '<center>Three Ways to Open The WSJ:<br /><table><tr><td>O</td><td> 1.) </td><td>'+ outline + '</td></tr><tr><td><img src=http://google.com/favicon.ico height=20></td><td> 2.) </td><td>' + go2 + '</td></tr><tr><td><img src=http://twitter.com/favicon.ico></td><td> 3.) </td><td>' + gotwit + '</td></tr></table>'; 
container_block = document.getElementsByTagName('body')[0]; 
container_block.appendChild(block_to_insert); 
mymenu.setAttribute('style', 'margin-left:auto; margin-right:auto; height:80px; width:50%; background-color:#FFFF00; color:black; float:left; font-family:arial,sans,verdana; font-size:20px; z-index:10000; display: inline-block;line-height:unset!important; line-height:1!important; overflow:visible; position:fixed; top: 0; padding:2px 5px;');
} else {
alert('This script is meant to be used on Wall Street Journal Articles!');
window.open('http://wsj.com', '_self');
}" title="Open the WSJ">WSJ</a></td><td>3 Ways to open the WSJ<br /><i class="gray">Choose how to circumvent the paywall at the WSJ</i></td></tr>
   <tr class="red"><td> <a class="button" href='javascript:(function()%7Bvar url %3D ""%3Bvar r %3D false%3Btry%7Burl %3D TuneIn.payload.Program.broadcast.StreamUrl%3Br %3D confirm("Station JSON URL successfully retrieved. Opening now.")%3Bif(r) %7Bwindow.open(url)%3B%7D%7Dcatch(e) %7Btry %7Burl %3D TuneIn.payload.Program.broadcast.StreamUrl%3Br %3D confirm("Station JSON URL successfully retrieved. Opening now.")%3Bif(r) %7Bwindow.open(url)%3B%7D%7Dcatch(ee) %7Balert("No TuneIn Station Detected")%3B%7D%7D%7D)()' title="Use this first to get the JSON page, then the second button!">👋 TuneInJSON Grab</a> <br />
  <a class="button" href='javascript:(function()%7Btry %7Bvar data %3D JSON.parse(document.getElementsByTagName("PRE")%5B0%5D.innerHTML)%3Bdata.Streams.forEach(function(element) %7Bprompt(element.Badwidth %2B "kbps%3A "%2C element.Url)%3B%7D)%3B%7Dcatch(err) %7Balert %3D "This is not a valid TuneIn metadata page."%7D%7D)()' title="Grab the MP3 from a TuneIn Station">⇓ TuneIn MP3 Stream</a></td><td>
    <h3>THIS ONE NEEDS WORK - QUIRKY!</h3> Use the first button to get the JSON page, <br />the second button grabs the MP3 stream.<br /><i class="gray">Grab an MP3 stream from any TuneIn station.</i></td></tr>
</table>
              
            
!

CSS

              
                body {background-color:#000; text-align:center; padding-top:1px; color:#fff; font-family:arial, sans, verdana;}
.button {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    padding: 4px 18px;
    border: 3px solid #982727;
    border-radius: 37px;
    background: #ff4a4a;
    background: -webkit-gradient(linear, left top, left bottom, from(#ff4a4a), to(#982727));
    background: -moz-linear-gradient(top, #ff4a4a, #982727);
    background: linear-gradient(to bottom, #ff4a4a, #982727);
    -webkit-box-shadow: #ff5959 0px 0px 8px 0px;
    -moz-box-shadow: #ff5959 0px 0px 8px 0px;
    box-shadow: #ff5959 0px 0px 8px 0px;
    text-shadow: #5a1717 1px 1px 1px;
    font: normal normal bold 20px arial;
    color: #ffffff;
    text-decoration: none;
}
.button:hover,
.button:focus {
    border: 3px solid #b32e2e;
    background: #ff5959;
    background: -webkit-gradient(linear, left top, left bottom, from(#ff5959), to(#b62f2f));
    background: -moz-linear-gradient(top, #ff5959, #b62f2f);
    background: linear-gradient(to bottom, #ff5959, #b62f2f);
    color: #ffffff;
    text-decoration: none;
}
.button:active {
    background: #982727;
    background: -webkit-gradient(linear, left top, left bottom, from(#982727), to(#982727));
    background: -moz-linear-gradient(top, #982727, #982727);
    background: linear-gradient(to bottom, #982727, #982727);
}

  table.center {
    margin-left:auto; 
    margin-right:auto;
    text-align:left;
    table-border:0px #fff;
    border-collapse: collapse;
}

table, th, td {
  border: 1px solid #b32e2e;
  padding: 6px 10px;
}

tr.red {background-color:#660000; color:#ff0}
.gray {color:#888}
.green {color:#0f0}
.blue {color:#66ffff}
.red {color:#b32e2e}

              
            
!

JS

              
                
              
            
!
999px

Console