Skip to content

Instantly share code, notes, and snippets.

View peterhartree's full-sized avatar

Peter Hartree peterhartree

View GitHub Profile
var waitTime = 0;
var maximumWaitTime = 1000 * 5; // 5 seconds
waitForSleeknoteToLoad(waitTime, maximumWaitTime);
function waitForSleeknoteToLoad(waitTime, maximumWaitTime) {
if(typeof SleekNote !== 'undefined' && typeof SleekNote.triggerOnclick === 'function'){
$(document).trigger('SleeknoteLoaded');
}
else {
waitTime += 1000;
/**
* This Google Sheets script keeps data in the specified column sorted any time
* the data changes.
*
* After much research, there wasn't an easy way to automatically keep a column
* sorted in Google Sheets, and creating a second sheet to act as a "view" to
* my primary one in order to achieve that was not an option. Instead, I
* created a script that watches for when a cell is edited and triggers
* an auto sort.
*
@peterhartree
peterhartree / messages.json
Created February 10, 2018 10:11
Inbox When Ready l18n
{
"appName": {
"message": "Inbox When Ready for Gmail™",
"description": "The name of the application, displayed in the web store."
},
"appDesc": {
"message": "Protect your focus... improve your inbox workflow.",
"description": "The short description of the application, displayed in the web store."
},
"inbox": {
@peterhartree
peterhartree / gist:275c4bcddc8eb3fe563f5dbb59a27d68
Created May 24, 2020 11:23
Firefox hide pinned tab title change notification dot
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
/* Completely hide the "title changed" notification dot on pinned tabs */
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged] {
background-image: none !important;
}
@peterhartree
peterhartree / its-ok-xero
Created July 25, 2023 22:37
Automate Xero reconcilliation
setInterval(() => {
let okayButtons = document.querySelectorAll('.okayButton');
okayButtons.forEach(button => {
if (getComputedStyle(button).display !== 'none') {
button.click();
}
});
}, 1000);