Skip to content

Instantly share code, notes, and snippets.

(function () {
// Install here: https://chriszarate.github.io/bookmarkleter/
// https://chat.openai.com/c/03d8944a-e0a4-4c8f-9074-037ab2497483
// https://www.bionize.app/
// https://chrome.google.com/webstore/detail/hyper-bold/bjicoipahmlimcmjoejgaoneibennoab
// https://stephanango.com/tidy
var readabilityTarget = 'div[id^="readability-"]';
<!DOCTYPE html>
<html>
<head>
<title>Fuel Usage and Trip Cost Calculator</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="p-3">
<h1 class="mb-3">Fuel Usage and Trip Cost Calculator</h1>
// Install here: https://chriszarate.github.io/bookmarkleter/
// 🪃 Email the current open page to yourself as a link via programatic mailto invocation
javascript:(function() {
var pageTitle = encodeURIComponent(document.title);
var pageUrl = encodeURIComponent(window.location.href);
var emailAddress = '[email protected]';
var subject = 'Note to self (' + pageTitle + ')';
var body = pageTitle + '%0A%0A' + pageUrl;
var mailtoLink = 'mailto:' + emailAddress + '?subject=' + subject + '&body=' + body;
@harryfear
harryfear / PayPalFeeCalculator.js
Created January 10, 2024 23:39
A versatile JavaScript tool for calculating PayPal transaction fees, supporting UK, EEA, and worldwide transactions with both forward and reverse fee calculations
/*
PayPal Fee Calculator - Accurate and Comprehensive
Last updated: 10 January 2024
0 x-border fees for UK-UK
1.29 x-border fees from EEA to UK
1.99 x-border fees from Rest of World to UK
This script is an essential tool for anyone dealing with PayPal transactions, particularly those who need to calculate fees for various types of international transactions. Whether you are a freelancer, running an online business, or simply need to manage personal transactions, this calculator is designed to make your financial planning easier and more precise.
Features:
@harryfear
harryfear / Click to read aloud (en-US).bookmarklet.js
Last active March 23, 2024 10:03 — forked from mimonelu/gist:a08f1aeab49dc760a14a43047473643b
読み上げブックマークレット
javascript:window.onmousemove=function(e){e.target.style.outline="2px #f00 solid";};window.onmouseout=function(e){e.target.style.outline="none";};window.onclick=function(e){var t=e.target.innerText,s=new SpeechSynthesisUtterance(t);console.log(t);s.lang="en-UK";s.pitch=1;s.rate=0.999;speechSynthesis.speak(s);};void(0);
// Check if WPForms is active
if ( class_exists( 'WPForms' ) ) {
// // Check if any active plugins contain the word "cache" or "caching"
if ( wpforms_has_caching_plugins() ) {
// Hook into the admin_notices action to display the warning banner
add_action('admin_notices', 'check_wpforms_for_antispam');
}
}
// Function to check if any active plugins contain the word "cache" or "caching"
// Function to check if the page was prerendered
function wasPrerendered() {
return document.prerendering || self.performance?.getEntriesByType('navigation')[0]?.activationStart > 0;
}
// Function to handle the transition from prerender to active
function handlePrerenderActivation() {
console.log('Pre-rendered page is now being shown to the user');
// Check if there are any query parameters