themactep.com

A home of miscellaneous projects by Paul Philippov.

Tampermonkey Userscripts

Tampermonkey is a browser extensions that let you store, manage, and run pieces of JavaScript code, called userscripts, on webpages that you browse. It helps automate thing, change page behaviour, tweak page look etc.

Here’s a collection of my userscripts. Maybe you could find something useful.

// ==UserScript==
// @name         Print Gmail E-mail
// @namespace    themactep
// @description  Strip Gmail overhead from email before printing.
// @author       Paul Philippov <paul@themactep.com>
// @match        https://mail.google.com/mail/*
// @grant        none
// @run-at       context-menu
// @version      20201225084000
// ==/UserScript==

(function() {
  let a = document.querySelector('.message');
  let body = document.querySelector('body');
  body.innerHTML = '';
  body.append(a);
})();

Leave multiple positive feedback on AliExpress in one click.

// ==UserScript==
// @name         AliExpress Leave positive feedback
// @namespace    themactep
// @description  AliExpress positive feedback helper.
// @author       Paul Philippov, paul@themactep.com
// @match        https://feedback.aliexpress.com/management/leaveFeedback.htm
// @grant        none
// @run-at       context-menu
// @version      20180827082951
// ==/UserScript==

(function() {
    const feedback = "It's all good. Thank you.";
    document.querySelectorAll('.star-5').forEach(function(el) { el.click(); });
    document.querySelectorAll('textarea').forEach(function(el) { el.textContent = feedback; });
})();