Skip to content

Instantly share code, notes, and snippets.

View magasine's full-sized avatar

Manoel Garcia da Silveira Neto magasine

View GitHub Profile
@cheeaun
cheeaun / horizontal-scroll.ahk
Created August 4, 2009 03:18
AutoHotkey: Shift + Wheel for horizontal scrolling
; Shift + Wheel for horizontal scrolling
+WheelDown::WheelRight
+WheelUp::WheelLeft
@romanz
romanz / wifi.js
Created January 8, 2012 14:56
WiFi switch bookmarklet for D-link DIR-300 wireless router
javascript:(function(){
location.assign("http://192.168.0.1/bsc_wlan.php");
document.getElementById("enable").checked = !document.getElementById("enable").checked;
check();
})()
@lemieuxster
lemieuxster / Bookmarkified
Created May 2, 2012 18:37
QR Code Bookmarklet
javascript:(function(window, document, undefined) {try {var selectedText = document.getSelection().toString(); if (selectedText === ''){selectedText = window.location.href;} if(selectedText !== ''){var baseQRUrl = 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=' + encodeURIComponent(selectedText); window.open(baseQRUrl, '_blank', 'width=400,height=400');}} catch (e) {}})(window, document);
@Integralist
Integralist / bookmarklet-screendimensions.js
Last active October 8, 2022 00:59
Made a super quick bookmarklet for displaying the current screen dimensions for Chrome
javascript:(function(w, d){
var el = d.createElement('div');
el.setAttribute('style', 'position: fixed; right: 1em; top: 0; background-color: red; color: white; padding: 5px; z-index: 1000;');
el.innerHTML = d.documentElement.clientWidth;
d.body.appendChild(el);
w.addEventListener('resize', function(){
el.innerHTML = d.documentElement.clientWidth;
}, false);
}(window, window.document));
@sillero
sillero / togetherjs.bookmarklet
Last active October 19, 2022 13:57
TogetherJS bookmarklet
javascript:(function(e,t,n){var r=function(){var t=function(e){e=e||10;var t='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV0123456789';var n='';for(var r=0;r<e;r++){n+=t.charAt(Math.floor(Math.random()*t.length))}return n},n=t(),r=e.prompt('Type session ID to join or create\n (default is \'together\')')||'together',i={reason:'started',shareId:r,running:true,date:Date.now(),sessionId:n};if(typeof sessionStorage['togetherjs-session.status']!=='undefined'){i=JSON.parse(sessionStorage['togetherjs-session.status']);i.shareId=r;i.running=true}i=JSON.stringify(i);return i}();sessionStorage['togetherjs-session.status']=r;if(typeof TogetherJS!=='undefined'){if(TogetherJS._loaded){TogetherJS.on('close',function(){TogetherJS(e)});TogetherJS(e)}else{TogetherJS(e)}}else{var i=t.createElement('script'),s='https://togetherjs.com/togetherjs-min.js';i.setAttribute('src',s);t.body.appendChild(i)}})(window,document)
@darrenscerri
darrenscerri / cursor.js
Created February 15, 2014 13:18
Bookmarklet to add an element to the page which displays cursor coordinates
javascript:(function() {
var div = document.createElement('div');
div.style.cssText = 'position:fixed;bottom:10px;right:10px;padding: 4px 8px;border: 1px solid black;z-index:99';
document.body.appendChild(div);
document.onmousemove = function(e) {
div.innerHTML = e.clientX + ' : ' + e.clientY;
};
})();
@squarestar
squarestar / 960this!.js
Last active October 7, 2022 19:54
Bookmarklet to resize a website's content to a centred, 960px-wide main column.
(function() {
if(document.querySelector('#wrap960') ) return;
var content = document.body.innerHTML;
var wrap = document.createElement('div');
wrap.setAttribute('id','wrap960');
wrap.setAttribute('style','position:relative;width:960px;margin:auto;');
wrap.innerHTML = content;
document.body.innerHTML = '';
document.body.appendChild(wrap);
})();
javascript:(function()%7Bfunction%20e(e)%7Bvar%20t,n,r=this;this.options=%7Btarget:window%7D;if(typeof%20e===%22object%22)%7Bfor(t%20in%20e)%7Bn=e%5Bt%5D;this.options%5Bt%5D=n%7D%7DsetTimeout(function()%7Br.init()%7D,1e3)%7De.prototype=%7BgetDistance:function()%7Bvar%20e=this.options.target;return%20e===window?window.scrollY:this.getTarget().scrollTop%7D,getHeight:function()%7Bvar%20e=this.options.target,t=document.body,n=document.documentElement;return%20e===window?Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight):this.getTarget().scrollHeight%7D,getTarget:function()%7Bvar%20e=this.options.target;return%20e===window?window:document.querySelector(e)%7D,init:function()%7Bvar%20e=this,t=window.innerHeight;var%20n=document.createElement(%22input%22);n.type=%22range%22;n.min=t;n.max=this.getHeight();n.value=this.getHeight()-this.getDistance();n.id=%22scrollBar%22;n.step=1;document.body.appendChild(n);n.onchange=function()%7Be.$scroll(this.max-this.value);if(this.value===this.min
@pachacamac
pachacamac / IdleBlur.js
Last active October 9, 2022 03:55
JavaScript Bookmarklet: Automatically Blur Websites When You Are Idle
javascript:(function(){
var delay=10000, intensity=10, timer;
function resetTimer(){clearTimeout(timer); timer = setTimeout(blur, delay);}
function activity(){document.documentElement.setAttribute('style',''); resetTimer();}
function blur(){document.documentElement.setAttribute('style', 'filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'blur\'><feGaussianBlur stdDeviation=\''+intensity+'\' /></filter></svg>#blur");-webkit-filter:blur('+intensity+'px);filter:blur('+intensity+'px);');}
['mousemove', 'keypress', 'scroll'].forEach(function(e){document.addEventListener(e, activity, false);});
resetTimer();
})();void(0);
@thiagoeliasr
thiagoeliasr / viewportsize.js
Last active October 8, 2022 01:24
Display ViewPort and Screen Resolution at the top of screen. (This script was created intended to be a bookmarklet)
$(document).find('body').append('<div id="div-width-top" style="position: fixed; right: 5px; top: 5px; background: #000; color: #fff; padding: 10px; z-index: 99999; opacity: 0.7">Window Size:</div>');
$('#div-width-top').html('ViewPort: ' + window.innerWidth + 'px | Window: ' + screen.width + 'px');
$(window).resize(function() {
$('#div-width-top').html('ViewPort: ' + window.innerWidth + 'px | Window: ' + screen.width + 'px');
});