This file contains hidden or 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
/* jshint esversion: 8 */ | |
(function () { | |
const domain = "https://example.com"; | |
const isLocalhost = window.location.href.indexOf("localhost") >= 0; | |
const localhost = "http://localhost:8080"; | |
const pathname = window.location.pathname; | |
const url = isLocalhost ? (domain + pathname) : (localhost + pathname); | |
window.location = url; | |
})(); |
This file contains hidden or 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 detect when mouse pointer leaves viewport | |
document.addEventListener("mouseleave", function(e){ | |
if( e.clientY < 0 ) | |
{ | |
alert("Hey don't leave. we have some offer for you"); | |
} | |
}, false); | |
//for more detail- http://qnimate.com/exit-intent-using-javascript |
This file contains hidden or 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: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
This file contains hidden or 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
// Simply copy and paste the following script in your browser's console, | |
// it will add an auto-scrolling button on the right part of the webpage you are visiting. | |
(function() { | |
let cssScrolling = "background-color: #f44336; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; float:right; position:fixed; right:0; top:50%;"; | |
let cssStopped = "background-color: #4CAF50; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; float:right; position:fixed; right:0; top:50%;"; | |
let btn = document.createElement("button"); | |
var isScrolling = false; | |
btn.innerHTML = "start scroll"; | |
btn.style.cssText = cssStopped; |
This file contains hidden or 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
//IP LOCATION TRACKER BOOKMARKLET | |
//Original source: https://funbutlearn.com/2016/06/ip-location-tracker-bookmarklet-created.html | |
//modified API service from http://ip-api.com which doesn't support HTTPS to https://ipapi.co/ to have a secure endpoint & avoid Mixed Content blocking issue | |
javascript: (function() { | |
var text = ""; | |
if (window.getSelection) { | |
text = window.getSelection().toString(); | |
} else if (document.selection && document.selection.type != "Control") { | |
text = document.selection.createRange().text; | |
} |
This file contains hidden or 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
| |
; Version: 2022.06.30.1 | |
; Usages and examples: https://redd.it/mq9m58 | |
ClipHistory(Ini, Monitoring := true) | |
{ | |
static instance := false | |
if (!instance) | |
instance := new ClipHistory(Ini, Monitoring) |
This file contains hidden or 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
// save scroll | |
javascript:(function(d, scrT){var lsKey = 'bmk_scroll_' + d.location.href,scrollPos = d.documentElement.scrollTop || d.body.scrollTop;localStorage[lsKey] = scrollPos;})(document) | |
// load scroll | |
javascript:(function(d, scrT){var lsKey = 'bmk_scroll_' + d.location.href;if(!localStorage[lsKey]){return}scrollTo(0, localStorage[lsKey]);})(document) |
This file contains hidden or 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. Open Chrome | |
2. New Bookmark | |
3. Enter Name - https://emojipedia.org/search/?q=calendar | |
4. Paste code below into URL field | |
*/ | |
javascript: (function() { | |
var title = encodeURIComponent("Follow Up - " + document.title.replace("Account > ","")); |
This file contains hidden or 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 PRECO_BOVESPA(ticker) { | |
var todayDate = new Date().toISOString().slice(0,10); | |
var url = "https://arquivos.b3.com.br/apinegocios/ticker/" + ticker + "/" + todayDate; | |
var json = JSON.parse(UrlFetchApp.fetch(url).getContentText()); | |
var price = json.values[0][2]; | |
return price; | |
} |
This file contains hidden or 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
Menu,Tray,Tip,Always on top`nWin+Space to toggle always on top | |
SendMode, Input | |
;#SPACE:: Winset, Alwaysontop, , A | |
#SPACE:: | |
WinGetActiveTitle, t | |
WinGet, ExStyle, ExStyle, %t% | |
if (ExStyle & 0x8) |