Skip to content

Instantly share code, notes, and snippets.

@realgenekim
Created October 19, 2023 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realgenekim/0234c5dd6ad093f57fa9b885f2bd5cd3 to your computer and use it in GitHub Desktop.
Save realgenekim/0234c5dd6ad093f57fa9b885f2bd5cd3 to your computer and use it in GitHub Desktop.
Expensify tampermonkey script: highlight in pink the comment field (not very visible), and certain expense categories
// ==UserScript==
// @name Highlight Expensify comment fields and dropdown boxes set to certain values
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.expensify.com/expenses
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
function run() {
// edit boxes
const elements = document.querySelectorAll("div.comment.detail-content.isEditable");
console.log("hello from tampermonkey script!")
elements.forEach(item => {
item.style.border = '3px solid pink';
})
// owner draw
const elements2 = document.querySelectorAll("div.category.detail-content.isEditable");
elements2.forEach(item => {
if (item.textContent.includes("Owners Draw/Contribution")) {
item.style.border = '3px solid pink';
}
})
}
window.onload = run;
setInterval(run, 1500);
// Your code here...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment