recentpopularlog in

kme : bookmarklet   40

Bookmarklet · Issue #20 · kognise/water.css
<code class="language-javascript">javascript:(()=%3E{let%20a=document,b=b=%3Ea.querySelectorAll(b),d=(b,c)=%3EObject.assign(a.createElement(b),c);b(%22link[rel=\%22stylesheet\%22],style%22).forEach(a=%3Ea.remove()),b(%22*%22).forEach(a=%3Ea.style=%22%22),a.head.append(d(%22link%22,{rel:%22stylesheet%22,href:%22//cdn.jsdelivr.net/gh/kognise/water.css%40latest/dist/light.css%22}),d(%22meta%22,{name:%22viewport%22,content:%22width=device-width,initial-scale=1.0%22}))})()</code>
css  stylesheet  readability  bookmarklet 
november 2019 by kme
AutoTOC
This script was not written by me, all credits go to the original author: Rune Skaug (see: UserScripts-Mirror).

I use this script for years, and though it was last updated in 2006, it still does a great job: it adds a TOC (table-of-contents) to each page, making long pages much easier to navigate. For the TOC not eating screen space unnecessarily, I recommend using it together with my Hide/unHide AutoTOC navigation bar user style.
toc  tableofcontents  userscript  javascript  bookmarklet 
july 2019 by kme
Table of Contents Everywhere
This one is good.
On pages which do not have a Table of Contents, but should do, create one! (I actually use this as a bookmarklet, so I can load it onto the current page only when I want it.)
userscript  javascript  bookmarklet  toc  tableofcontents  solution 
july 2019 by kme
GitHub Table of Contents
I think this was ripped from a Chrome extension. Did not try it, since https://greasyfork.org/en/scripts/7673-table-of-contents-everywhere worked fine for what I needed.
bookmarklet  userscript  toc  tableofcontents  github  javascript 
july 2019 by kme
Content Security Policy | https://github.com/
Bookmarklets

As made clear by the CSP spec, browser bookmarklets shouldn't be affected by CSP.

Enforcing a CSP policy should not interfere with the operation of user-supplied scripts such as third-party user-agent add-ons and JavaScript bookmarklets.

http://www.w3.org/TR/CSP/#processing-model

Whenever the user agent would execute script contained in a javascript URI, instead the user agent must not execute the script. (The user agent should execute script contained in "bookmarklets" even when enforcing this restriction.)

http://www.w3.org/TR/CSP/#script-src

But, none of the browsers get this correct. All cause CSP violations and prevent the bookmarklet from functioning.

Though its highly discouraged, you can disable CSP in Firefox as a temporary workaround. Open up about:config and set security.csp.enable to false.
security  github  javascript  csp  firefox  bookmarklet  annoyance  sortof  solution 
november 2017 by kme
http://iamfutureproof.com/javascripts/tools/break-ideas/bookmarklet.js
(function(){var a;a=function(){function d(){this.pop=window.open(a,"Break Ideas","height="+b+",width="+c+",location=no,scrolling=no"),window.focus&&this.pop.focus()}var a,b,c;return d.name="PopoutController",a="/tools/break-ideas/widget",b=276,c=500,d}(),$(function(){return new a})}).call(this);
typingbreak  bookmarklet 
august 2017 by kme
Restoring CC attribution to Flickr, because Yahoo broke it - Boing Boing
What incenses me the most is the JavaScript fuckery that breaks copy-and-paste. I blame Quora. For all of it.
flickr  design  creativecommons  copyright  borkedredesign  breakingtheweb  fuckery  bookmarklet  workaround 
april 2014 by kme
Nevernote | PortableApps.com - Portable software for USB, portable and cloud drives - http://portableapps.com/

note source HTML & ENML editors
andriuz - April 12, 2013 - 12:54pm
IMHO more valueable is that with NixNote / NeverNote Version you can edit note's HTML source, with Evernote - can't


https://sourceforge.net/mailarchive/message.php?msg_id=27857013
Finally, I'd like to point out that this release adds the ability to view and edit the source HTML of a note. This can be useful if you have problems saving a note or to tweak the formatting. The thing to remember is that it will still try to cleanup any invalid HTML so it can be synchronized with Evernote, so formatting may still be modified after saving. It also won't prevent you from doing anything foolish like editing encrypted text or changing resource GUIDs so be careful.

othervise you have to use online bookmarklet ENML Editor

http://enml-editor.ping13.net/
Get your hands dirty with your Evernote notes.
evernote  tipsandtricks  enml  editor  linux  bookmarklet 
february 2014 by kme
I'd like to use the web my way, thank you very much Quora. - Scott Hanselman
The following can be used as a bookmarklet to fix that page on iOS and show the content:
javascript:(function($) {
$(".app_promo, .app_install_dialog").hide();
$(".answer_text").css({'margin-left': '110px', 'width': '88%'});
}(jQuery));
Sam V
quora  bookmarklet  annoyance  paywall 
february 2013 by kme
TripTracker slideshow - Home
The bookmarklet:
javascript:s=document.createElement('script');s.src='http://slideshow.triptracker.net/slide-bookmark.js';s.type='text/javascript';void(document.getElementsByTagName('head')[0].appendChild(s));

And the JS source:
/*
* (c) Copyright 2006, Klika, all rights reserved.
*
* This code is the property of Klika d.o.o. The code
* may not be included in, invoked from, or otherwise
* used in any software, service, device, or process
* which is sold, exchanged for profit, or for which
* a license, subscription, or royalty fee is charged.
*
* Permission is granted to use this code for personal,
* educational, research, or commercial purposes, provided
* this notice is included, and provided this code is not
* used as described in the above paragraph.
*
* This code may not be modified without express
* permission of Klika. You may not delete, disable, or in
* any manner alter distinctive brand features rendered
* by the code. The use of this code in derivative work is
* permitted, provided that the code and this notice are
* included in full, and provided that the code is used in
* accordance with these terms.
*
* Email: info at triptracker.net
* Web: http://slideshow.triptracker.net
*/
var MESSAGES = {
"format.date": "MM/dd/yyyy",
"format.time": "h:mm a",

"photoviewer.toolbar.first": "Go to Start (Home)",
"photoviewer.toolbar.prev": "Previous Photo (Left arrow)",
"photoviewer.toolbar.slideShow": "Start/Pause Slide Show (Space)",
"photoviewer.toolbar.next": "Next Photo (Right arrow)",
"photoviewer.toolbar.last": "Go to End (End)",
"photoviewer.toolbar.email": "Email Photo",
"photoviewer.toolbar.permalink": "Link to Photo",
"photoviewer.toolbar.close": "Close (Esc)",
"photoviewer.email.subject.photo": "Photo",

"gallery.nophotos": "No photos",
"gallery.thumbs.start": "Start",
"gallery.thumbs.end": "End",
"gallery.toolbar.first": "First Photo",
"gallery.toolbar.prev": "Previous Photo",
"gallery.toolbar.view": "View Photo",
"gallery.toolbar.next": "Next Photo",
"gallery.toolbar.last": "Last Photo",
"gallery.view.full": "Maximize Window",
"gallery.view.photo": "Show Photo Only",
"gallery.view.text": "Show Description Only",
"gallery.view.close": "Close Window"
};

var agent=navigator.userAgent.toLowerCase();var IE=(agent.indexOf("msie")!=-1&&agent.indexOf("opera")==-1);var IE7=(agent.indexOf("msie 7")!=-1);var IE8=(agent.indexOf("msie 8")!=-1);var OPERA=(agent.indexOf("opera")!=-1);var SAFARI=(agent.indexOf("safari")!=-1);var FIREFOX=(agent.indexOf("gecko")!=-1);var STRICT_MODE=(document.compatMode=="CSS1Compat");var _DOMAIN=undefined;var GALLERY_W=650;var GALLERY_H=530;if(USE_GOOGLE_MAPS==undefined){var USE_GOOGLE_MAPS=true;}
var USE_OLD_MAPS=!USE_GOOGLE_MAPS;var TESTING=false;var log=getLogger();if(document.location.href.indexOf("#jslog")!=-1)
log.enable();function Logger(){this.enable=loggerEnable;this.clear=loggerClear;this.log=loggerLog;this.debug=loggerDebug;this.info=loggerInfo;this.error=loggerError;var console=undefined;try{console=document.createElement("textarea");console.style.display="none";console.style.position="absolute";console.style.right="2px";console.style.bottom="2px";console.style.width="23em";console.style.height="40em";console.style.fontFamily="monospace";console.style.fontSize="9px";console.style.color="#000000";setOpacity(console,0.7);console.border="1px solid #808080";console.ondblclick=clearLogger;}catch(e){}
this.console=console;this.enabled=false;this.logTimeStart=getTimeMillis();}
function getLogger(){var log=undefined;var win=window;while(log==undefined){try{log=win.document.log;}catch(e){break;}
if(win==win.parent)
break;win=win.parent;}
if(log==undefined){log=new Logger();document.log=log;}
return log;}
function clearLogger(){getLogger().clear();}
function loggerEnable(){if(this.enabled||this.console==undefined)
return;if(window.document.body!=undefined){window.document.body.appendChild(this.console);this.console.style.display="";this.enabled=true;}}
function loggerDebug(msg){this.log("DEBUG",msg);}
function loggerInfo(msg){this.log("INFO",msg);}
function loggerError(msg,e){this.log("ERROR",msg,e);}
function loggerLog(level,msg,e){if(!this.enabled||this.console==undefined)
return;var millis=(getTimeMillis()-this.logTimeStart)+"";while(millis.length<6)
millis+=" ";var m=millis+" ";if(msg!=undefined)
m+=msg+" ";if(e!=undefined)
m+=e.name+": "+e.message;this.console.value+=m+"n";}
function loggerClear(){if(!this.enabled||this.console==undefined)
return;this.console.value="";}
function getTimeMillis(){var t=new Date();return Date.UTC(t.getFullYear(),t.getMonth(),t.getDay(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());}
function getEvent(event){return(event!=undefined?event:window.event);}
function preventDefault(event){if(event.stopEvent)
event.stopEvent();if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}}
function getEventTarget(event){if(event==undefined)
return undefined;if(event.srcElement!=undefined)
return event.srcElement;else
return event.target;}
function getMousePosition(event){event=getEvent(event);var scrollLeft=window.pageXOffset;if(scrollLeft==undefined||scrollLeft===0)
scrollLeft=window.document.documentElement.scrollLeft;if(scrollLeft==undefined||scrollLeft===0)
scrollLeft=window.document.body.scrollLeft;var scrollTop=window.pageYOffset;if(scrollTop==undefined||scrollTop===0)
scrollTop=window.document.documentElement.scrollTop;if(scrollTop==undefined||scrollTop===0)
scrollTop=window.document.body.scrollTop;var x=event.clientX+scrollLeft;var y=event.clientY+scrollTop;return{x:x,y:y};}
function getResponse(url,async,getXML,callback,data){var req=undefined;try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){req=new XMLHttpRequest();}}
if(req==undefined){log.error("Failed to initialize XML/HTTP");return undefined;}
req.open("GET",url,async);if(!async){req.send(undefined);if(req.readyState!=4){log.error("Request failed: "+req.readyState);return undefined;}
if(!getXML)
return req.responseText;else
return req.responseXML;}else{pollResponse(req,callback,data);req.send(undefined);return undefined;}}
function pollResponse(req,callback,data){if(req.readyState!=4)
window.setTimeout(function(){pollResponse(req,callback,data);},100);else
callback(req,data);}
function getDOMLocation(node){var x=node.offsetLeft;var y=node.offsetTop;while(node.offsetParent){x=x+node.offsetParent.offsetLeft;y=y+node.offsetParent.offsetTop;if(node==document.getElementsByTagName('body')[0]){break;}else{node=node.offsetParent;}}
return{x:x,y:y};}
function getElementsByTagName(node,tag){if(node==undefined)
return undefined;if(IE){return node.getElementsByTagName(tag);}
if(tag.indexOf(":")!=-1){tag=tag.split(":")[1];}
return node.getElementsByTagNameNS("*",tag);}
function getFirstElementsValue(node,tag){if(node==undefined)
return undefined;var nodes=getElementsByTagName(node,tag);if(nodes.length===0)
return undefined;else
return getElementValue(nodes[0]);}
function findDOMElement(id){var el=undefined;var win=window;while(el==undefined){try{el=win.document.getElementById(id);}catch(e){break;}
if(win===win.parent){break;}
win=win.parent;}
return el;}
function getElementValue(node){var i;var val="";for(i=0;i<node.childNodes.length;i++){if(node.childNodes[i].nodeValue!==null)
val+=node.childNodes[i].nodeValue;}
return val;}
function trim(str){if(str==undefined)
return undefined;return str.replace(/^s*([sS]*S+)s*$|^s*$/,'$1');}
function trimToLen(str,len){if(str==undefined){return undefined;}
if(str.length>len){str=str.substring(0,len)+"...";}
return str;}
function getRootWindow(){var win=window;while(win!=undefined){try{if(win===win.parent){break;}else if(win.parent!=undefined&&win.parent.document.location.href.indexOf("/selenium-server/")!=-1){break;}
win=win.parent;}catch(e){win.permissionDenied=true;break;}}
return win;}
function getURLParams(){var i,params=[];var url=window.location.search;if(url==undefined||url.length===0)
return undefined;url=url.substring(1);var namevals=url.replace(/+/g," ").split("&");for(i=0;i<namevals.length;i++){var name,val;var pos=namevals[i].indexOf("=");if(pos!=-1){name=namevals[i].substring(0,pos);try
{val=decodeURIComponent(namevals[i].substring(pos+1));}
catch(e)
{val=unescape(namevals[i].substring(pos+1));}}else{name=namevals[i];val=undefined;}
params[name]=val;}
return params;}
function joinLists(list1,list2){var i;var size=0;var result=[];if(list1!=undefined&&list1.length>0){for(i=0;i<list1.length;i++)
result[i]=list1[i];size=list1.length;}
if(list2!=undefined&&list2.length>0){for(i=0;i<list2.length;i++)
result[i+size]=list2[i];}
return result;}
function setCookie(name,value,expire){var expiry=(expire==undefined)?"":("; expires="+expire.toGMTString());document.cookie=name+"="+value+expiry;}
function getCookie(name){if(document.cookie==undefined||document.cookie.length===0)
return undefined;var search=name+"=";var index=document.cookie.indexOf(search);if(index!=-1){index+=search.length;var end=document.cookie.indexOf(";",index);if(end==-1)
end=document.cookie.length;return unescape(document.cookie.substring(index,end));}}
function removeCookie(name){var today=new Date();var expires=new Date();expires.setTime(today.getTime()-1);setCookie(name,"",expires);}
function getMessage(id){if(MESSAGES[id]==undefined){return"("+id+")";}else{return MESSAGES[id];}}
function localizeNodeAttribs(node){var i;if(node==undefined)
return;if(node.alt!=undefined&&node.alt.indexOf("#")===0){node.alt=getMessage(node.alt.substring(1));}
if(node.title!=undefined&&node.title.indexOf("#")===0){node.title=getMessage(node.title.substring(1));}
if(node.childNodes!=undefined){for(i=0;i<node.childNodes.length;i++){localizeNodeAttribs(node.… [more]
slideshow  javascript  bookmarklet  essential  webannoyances  lightbox 
october 2011 by kme
[JavaScript] Accesskey Highlighting bookmarklet - Pastebin.com [http://pastebin.com/]
javascript:(function(){var%20s="a[accesskey]:after,button[accesskey]:after,input[accesskey]:after,label[accesskey]:after,legend[accesskey]:after,textarea[accesskey]:after{margin-left:0.3em;background-color:#000;color:#fff;font-size:125:padding:.125em%20.125em;content:\"[\"attr(accesskey)\"]\";\n}";var%20h=document.getElementsByTagName("head");if(h.length>0){var%20n=document.createElement("style");n.type="text/css";n.appendChild(document.createTextNode(s));h[0].appendChild(n);}})();
javascript  bookmarklet  webdevel  accesskey  userstyle 
may 2011 by kme

Copy this bookmark:





to read