Skip to content

Commit

Permalink
Add userscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lainiwa committed Jul 13, 2023
1 parent cbf1ae5 commit b936438
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
15 changes: 15 additions & 0 deletions firefox/userscripts/alison_auto_starter.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// ==UserScript==
// @name alison.com auto starter
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Auto click "Start topic" on alison.com
// @match https://alison.com/topic/learn/*
// @author lainiwa
// @grant none
// ==/UserScript==

window.addEventListener('load', function() {
let elem = document.getElementById("player_button_right");
elem.classList.add('ready');
elem.click()
}, false);
26 changes: 26 additions & 0 deletions firefox/userscripts/atomatic_chatgpt_retry.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// ==UserScript==
// @name Atomatic ChatGPT Retry
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author lainiwa
// @match https://chat.openai.com/chat
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
// @grant none
// ==/UserScript==

var intervalId = window.setInterval(function(){

let xpath = "//button[text()='Try again']";
let button = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

if (
button && (
document.body.innerText.includes("An error occurred. If this issue persists please contact us through our help center at help.openai.com.") &&
document.body.innerText.includes("NetworkError when attempting to fetch resource.") &&
)
) {
button.click();
}

}, 1000);

0 comments on commit b936438

Please sign in to comment.