Unhappy with the loss of formatting when you copy and paste snippits from a web page for saving or printing? That's because you separate the stylesheets from the web content that you grabbed. The solution is to have a WYSIWYG editor living in the webpage that you're grabbing snippits from. This handy bookmarklet plops an editor at the webpage's bottom that you can transfer snippets to. When you're done click the print button and a new window will open with your collected content along with the page's stylesheets. Cancel the print dialog if you like and just save the page (Ctl-s).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* load-external-script-snippet.js | |
* Kosei Moriyama <[email protected]> | |
* | |
* Simple code snippet for loading external script from a bookmarklet. | |
* Replace example url of script to your target script url before use. | |
*/ | |
(function() { | |
var u = 'http://example.com/bookmarklet.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prompt and filter a PR's changed files by the given extension(s). | |
*/ | |
var els=document.getElementsByClassName('user-select-contain'); | |
var input = prompt('File extension(s), comma separated'); | |
els = [].forEach.call(els, function(el) { | |
var parent = el; | |
while (parent && !parent.classList.contains('js-details-container')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python file downloader for Pythonista by OMZ Software | |
# By: EJM Software ---- http://ejm.cloudvent.net | |
# Source: https://gist.github.com/89edf288a15fde45682a | |
# ***************************************** | |
# This simple script uses the requests module to download files | |
# and the ui module to show a progress bar | |
# You can use this bookmarklet to download files from Safari: | |
# javascript:window.location='pythonista://filedownloader?action=run&argv='+encodeURIComponent(document.location.href); | |
import ui, console, clipboard, sys, requests, zipfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Will not select system databases (greyed out) | |
* Works with regular expressions: | |
* '^te' -> matches 'test' database | |
* '^est' -> will NOT match 'test' database | |
* | |
* I created this to easily drop numerous databases | |
* that are part of a large system, such as 'phabricator.' | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to use: | |
// 1. Save the bookmarklet | |
// 2. Go to a Giantbomb video page and click the Bookmarklet | |
// Bonus. Works on CBSi player so Gamespot video's work too | |
// ## Bookmarklet | |
javascript:(function(){var%20videoStream;var%20videoEl;var%20el;var%20vidWrapper=document.querySelector('.av-video-player');if(!vidWrapper||!vidWrapper.dataset.video){console.log('No%20video%20player%20element%20or%20dataset');}var%20videoData=JSON.parse(vidWrapper.dataset.video);videoStream=videoData.videoStreams.adaptive_stream;console.log(videoStream);videoEl=document.createElement('video');videoEl.controls=true;videoEl.style='width:100%;height:100%;position:relative;z-index:999;';vidWrapper.parentNode.replaceChild(videoEl,vidWrapper);el=document.createElement('script');el.addEventListener('load',function(){if(Hls.isSupported()){var%20hls=new%20Hls();hls.loadSource(videoStream);hls.attachMedia(videoEl);hls.on(Hls.Events.MANIFEST_PARSED,function(){videoEl.play();});}},false);el.src='https://cdn.rawgit.com/dailymotion/hls.js/mast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:function tinycc_bookmarklet(){var script=document.createElement('script');script.src='http://tiny.cc/public/javascript/bookmarklet.js';scriptObj=document.body.appendChild(script);}tinycc_bookmarklet(); | |
javascript:void(window.open('http://3.ly/?bm=1&u='+encodeURIComponent(location.href))) | |
javascript:(function(){var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://identi.ca//index.php?action=bookmarklet',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%E2%80%9C'+((e(s))?e(s):e(document.title))+'%E2%80%9D%20%E2%80%94%20'+e(l.href);function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=450,height=200')){l.href=g;}}a();})() | |
javascript:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function codify() { | |
$('span:contains("{")').each(function() { | |
var text = $(this).ignore().text(); | |
var nodes = $(this).find("*").clone(); | |
var res = text.replace(/(\{.+\})/, function (x) { | |
var s = '</span><code class="lang-json">'; | |
s += "" + x + ""; | |
s += '</code><br><span class="non-code">'; | |
return '<span class="non-code">' + s + '</span>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Put links to injectable scripts in the cdns array. Try searching on cdnjs.com | |
but if you need the latest you can use the github version via https://rawgit.com/. | |
This start with // so they word on https and http. | |
They are not minified so comment are visible during development. | |
**/ | |
var cdns = [ | |
/* polyfill */ |
NewerOlder