Skip to content

Instantly share code, notes, and snippets.

@rickdog
rickdog / README.md
Last active March 23, 2021 15:31
Put a NiceEdit wysiwyg editor at the bottom of a webpage, a bookmarklet that makes collecting web snippets super easy, while preserving formatting.

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).

@tallykatt
tallykatt / load-external-script-snippet.js
Created July 24, 2016 23:35 — forked from cou929/load-external-script-snippet.js
Simple code snippet for loading external script from a bookmarklet.
/**
* 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';
@fabien-d
fabien-d / github.pr.toggle.file.extension.js
Last active May 14, 2018 17:58
Filter GitHub pull request changed files by extension
/**
* 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')) {
@bron84
bron84 / filedownloader.py
Created June 1, 2016 07:15 — forked from bitoffdev/filedownloader.py
filedownloader.py
# 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
@Erutan409
Erutan409 / pma-db-select-bookmarklet.js
Last active July 25, 2016 01:59
phpMyAdmin - Bookmarklet for quickly selecting database(s) on a search string
/**
* 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.'
*/
@andymason
andymason / GiantBomb HLS Video player.js
Last active March 9, 2017 12:21
Lower CPU usage than Flash player with the benefits of bitrate stream switching.
// 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
@Shoora
Shoora / Bookmarklets.js
Last active April 23, 2023 03:56 — forked from heavensrevenge/gist:712735
Bookmarklets
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.
@elcritch
elcritch / json-hack.js
Last active July 25, 2016 01:57
JSON viewer hack
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>';
@wassname
wassname / inject_scripts.js
Last active July 25, 2016 02:16
Snippet to inject jquery etc into page
/**
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 */
@Fischaela
Fischaela / social-sharer.html
Created February 22, 2016 10:49
List of Social Sharing Links
<a href="http://www.facebook.com/sharer.php?u=[post-url]"></a>
<a href="https://twitter.com/share?url=[post-url]&text=[post-title]&via=[via]&hashtags=[hashtags]"></a>
<a href="https://plus.google.com/share?url=[post-url]"></a>
<a href="https://pinterest.com/pin/create/bookmarklet/?media=[post-img]&url=[post-url]&is_video=[is_video]&description=[post-title]"></a>
<a href="http://www.linkedin.com/shareArticle?url=[post-url]&title=[post-title]"></a>
<a href="http://bufferapp.com/add?text=[post-title]&url=[post-url]"></a>
<a href="http://digg.com/submit?url=[post-url]&title=[post-title]"></a>
<a href="http://www.tumblr.com/share/link?url=[post-url]&name=[post-title]&description=[post-desc]"></a>
<a href="http://reddit.com/submit?url=[post-url]&title=[post-title]"></a>
<a href="http://www.stumbleupon.com/submit?url=[post-url]&title=[post-title]"></a>