Skip to content

Instantly share code, notes, and snippets.

View thefloodshark's full-sized avatar

theFloodShark thefloodshark

View GitHub Profile
@thefloodshark
thefloodshark / paypal-offer.js
Created March 14, 2024 22:01
PayPal Offer Auto-Accepter
// https://www.paypal.com/shopping/
// for use in console, Tampermonkey, etc.
// Select all elements with specified class
var buttons = document.querySelectorAll('.shopping-view-ujbh5m-icon-button_base-secondary');
// Click each button
buttons.forEach(function(button) {
button.click();
});
@thefloodshark
thefloodshark / .js
Created April 3, 2018 04:30
Tampermonkey Userscript - Automatically Close Tab Based on Page Text
// ==UserScript==
// @name Autoclose Tab
// @namespace Autoclose Tab
// @include *
// ==/UserScript==
// separate words or phrases with a comma
var blacklist = ["cactus", "finances", "put other text here"],
re = new RegExp(blacklist.join('|'), "i");
if (re.test(document.body.textContent)) {
@thefloodshark
thefloodshark / click-element.html
Created October 6, 2023 08:08
Independently Toggle Display of Elements When Clicked
<h2 class="clickable-element" onclick="toggleContent(this)">Toggle H2 1</h2>
<p class="content">Content 1</p>
<h2 class="clickable-element" onclick="toggleContent(this)">Toggle H2 2</h2>
<p class="content">Content 2</p>
<h2 class="clickable-element" onclick="toggleContent(this)">Toggle H2 3</h2>
<p class="content">Content 3</p>
@thefloodshark
thefloodshark / wf-promos.js
Created October 6, 2023 05:34
Wells Fargo Promo Activation (Tampermonkey)
// ==UserScript==
// @name Wells Fargo Promo Activation
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Clicks on elements with alternating classes
// @match https://web.secure.wellsfargo.com/auth/deals-portal
// @grant none
// ==/UserScript==
(function() {
@thefloodshark
thefloodshark / amex-promo.js
Created October 6, 2023 03:33
American Express Promo Accepter (Tampermonkey)
// ==UserScript==
// @name Amex Promo Offers Accepter
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Clicks on elements with class "offer-cta" one at a time with a delay
// @match https://global.americanexpress.com/offers/eligible
// @grant none
// ==/UserScript==
(function() {
@thefloodshark
thefloodshark / AHK-end.bat
Created September 6, 2023 05:51
Batch file that exits all AHK scripts
@echo off
taskkill /f /im "autohotkey.exe"
@thefloodshark
thefloodshark / wasd.ahk
Last active March 26, 2023 07:04
WASD Gaming Keybindings
; WASD keybinds I made for Undertale
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#HotkeyInterval 1000 ; Prevent Script from bugging out when you press the keys too quickly in succession.
Esc::ExitApp ; Exit script with Escape key
@thefloodshark
thefloodshark / .js
Created April 2, 2018 07:36
Tampermonkey Userscript - Website Auto-Refresh Timer
// ==UserScript==
// @name Auto-Refresh
// @include https://www.example.com
// ==/UserScript==
//--- https://stackoverflow.com/questions/25484978/i-want-a-simple-greasemonkey-script-to-reload-the-page-every-minute
setTimeout(function(){ location.reload(); }, 20*1000);
@thefloodshark
thefloodshark / volume_scroll.ahk
Last active December 11, 2022 10:08
Hover over any taskbar and mouse wheel scroll to change volume
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#If MouseIsOver("ahk_class Shell_TrayWnd") or MouseIsOver("ahk_class Shell_SecondaryTrayWnd")
WheelUp::Send {Volume_Up}
WheelDown::Send {Volume_Down}
MouseIsOver(WinTitle)
@thefloodshark
thefloodshark / .js
Created April 2, 2018 07:34
Tampermonkey UserScript - Automatic Tab Closer Based on Designated URL Text
// ==UserScript==
// @name Autoclose URL
// @namespace Autoclose URL
// @include *
// @grant window.close
// ==/UserScript==
function check_if_should_close(url) {
if (url.match(/rnoreward/))
return true;