Skip to content

Instantly share code, notes, and snippets.

@mvark
mvark / gist:10298300eabc2965e039a4a02b69faab
Created March 3, 2020 18:13
Reading View Bookmarklet for Microsoft Edge
javascript:(function(){a=document.getElementsByTagName('a');for(i=0;i<a.length;i++){a[i].href='read:'+a[i].href;a[i].target='_blank';a[i].style.backgroundColor='#f0f0f0';}}());
@mvark
mvark / ReadingViewBookmarklet.js
Created March 3, 2020 18:19
Readable version of Reading View Bookmarklet for Microsoft Edge
javascript:(function() {
a = document.getElementsByTagName('a');
for (i = 0; i < a.length; i++) {
a[i].href = 'read:' + a[i].href;
a[i].target='_blank';
a[i].style.backgroundColor = '#f0f0f0';
}
}())
@mvark
mvark / IFTTT_Webhook.html
Created May 10, 2020 10:49
IFTTT_Webhook demo
<html>
<head>
<title>Add</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src=https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js></script>
</head>
<body>
Input item details:
<input type="text" id="movie" placeholder="Movie:" size="50"><br><br>
<input type="text" id="description" placeholder="Description:" size="50"><br><br>
@mvark
mvark / IframedTweets.html
Last active January 14, 2021 17:49
Responsive Iframed Tweets Carousel
<html>
<head>
<title>
Iframed Tweets
</title>
<style>
.container {
position: relative;
overflow: hidden;
width: 100%;
@mvark
mvark / IPLookup.js
Created May 6, 2021 10:08
Bookmarklet that calls a REST API to fetch geolocation details for a given IP address
//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;
}
@mvark
mvark / IMDbSearch.js
Created May 9, 2021 06:54
IMDb Search bookmarklet inspired by the Wikipedia Search bookmarklet code here - https://en.wikipedia.org/wiki/Bookmarklet
javascript:(function() {
function se(d) {
return d.selection ? d.selection.createRange().text : d.getSelection()
}
s = se(document);
//for (i=0; i<frames.length && (s==null || s==''); i++) s = se(frames[i].document);
if (!s || s=='') s = prompt('Enter%20search%20terms%20for%20IMDb','');
open('https://m.imdb.com/find?q=' + s).focus();
})();
@mvark
mvark / Bookmarker
Last active January 6, 2022 16:54
Browser Bookmarklet to record an open web page's URL & its title as a row in Google Sheets
//Following code can be used within Google App Script editor & deployed
//Original code - https://stackoverflow.com/q/15592094/325251
function doGet(request) {
var ss = SpreadsheetApp.openByUrl( "https://docs.google.com/spreadsheet/ccc?key=<YOUR-SPREADSHEET-ID>");
var sheet = ss.getSheets()[0];
//just this line was tweaked to include the web page's title
var headers = ["Timestamp", "url","title"];
@mvark
mvark / Skribbl-words.csv
Last active April 24, 2025 13:29
skribbl.io word list
word count
ace 3
ant 3
arm 3
ash 3
axe 3
bad 3
bag 3
bar 3
bat 3
@mvark
mvark / download.ps
Created November 25, 2022 08:26
PowerShell script to download a list of files that have a predictable number pattern
# PowerShell script to download a list of files that have a predictable number pattern 1.jpg, 2.jpg etc..
$baseUri = "https://somesite.com/files/"
for ($i = 1; $i -lt 9; $i++) {
{
$f = $baseUri + $i + ".jpg"
$Downloadpath = "C:\temp\" + $i + ".jpg"
Write-Output "Processing file: $f"
Invoke-WebRequest -Uri $f -Outfile $Downloadpath
}
@mvark
mvark / EstimatedReadingTime.js
Last active November 15, 2023 03:27
Bookmarklet code to calculate Word Count & Estimated Reading Time
// Code generated by Bard
// IIFE (Immediately Invoked Function Expression) is used to encapsulate the code within a function to avoid polluting the global namespace and execute it immediately
//default parameter is used to set the initial value of the wordsPerMinute variable to 200 assuming assuming that words-per-minute rate for reading. You can adjust this value based on your preferred reading speed.
javascript:(function(wordsPerMinute = 200) {
// selected text from the webpage is trimmed of any leading or trailing whitespaces
const selectedText = window.getSelection().toString().trim();
// We proceed to calculate the estimated reading time based on the selected text or all words in the body
// single ternary expression is used instead of if statements