Skip to content

Instantly share code, notes, and snippets.

@malys
Last active April 7, 2024 16:14
Show Gist options
  • Save malys/65c7dd22a7ed0c0aeabb306d42d4aad6 to your computer and use it in GitHub Desktop.
Save malys/65c7dd22a7ed0c0aeabb306d42d4aad6 to your computer and use it in GitHub Desktop.
[Automobile Propre] optimization #userscript #violentmonkey
// ==UserScript==
// @namespace
// @name Automobile propre last page/last comment
// @grant none
// @version 0.0.1
// @author malys
// @description view last comments
// @run-at document-end
// @match https://forums.automobile-propre.com/topic/*
// ==/UserScript==
pages = [...document.getElementsByClassName('fa-angle-double-right')];
console.log(pages)
// Loop through each link
if(pages.length>0){
let page = pages[0];
page.click();
}
setTimeout(() => {
links = [...document.getElementsByTagName('a')].filter(f=> f.innerText.indexOf('Citer') > -1);
console.log(links)
// Loop through each link
if(links.length>0){
let link = links[links.length-2];
link.scrollIntoView();
}
}, "1000");
// ==UserScript==
// @namespace
// @name Automobile propre unread
// @grant none
// @version 0.0.1
// @author malys
// @description
// @run-at document-end
// @match https://forums.automobile-propre.com/followed/
// @grant GM.xmlHttpRequest
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_openInTab
// ==/UserScript==
//
links = [... document.querySelectorAll(".ipsDataItem_unread > div > h4 > span > a")].map(m=> m.href)
links.forEach(f=> GM_openInTab(f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment