Skip to content

Instantly share code, notes, and snippets.

@prigaux
Last active January 15, 2026 10:13
Show Gist options
  • Select an option

  • Save prigaux/025961c32ae0378c3d1ac7bc1cdbe5c4 to your computer and use it in GitHub Desktop.

Select an option

Save prigaux/025961c32ae0378c3d1ac7bc1cdbe5c4 to your computer and use it in GitHub Desktop.
// NB: no empty lines in each block
/// PRI_assistance_dsiun.js
if (window.parent === window) {
console.log("PRI_assistance_dsiun.js");
window.addEventListener('load', function() {
const elt = document.querySelector('a[href="/front/ticket.form.php?showglobalkanban=1"]')
elt.target = "blank"
elt.href = 'https://p1ps.fr/Mes-taches-a-faire'
elt.innerText = 'Mes tâches'
setTimeout(function () {
for (const e of [...document.querySelectorAll('.timeline-item.Log ins')]) {
if (e.textContent.match(/^\w+ \(\d+\)$/)) {
e.classList.add("derniere-modification-par")
}
}
}, 3000)
});
}
/// PRI_itopshib.js
console.log("PRI_itopshib.js");
if (document.location.pathname.startsWith('/itop/')) {
document.location.pathname = document.location.pathname.replace('/itop/', '/itopshib/')
}
/// PRI_monlycee.js
console.log("PRI_monlycee.js")
setTimeout(() => document.querySelector('form').submit(), 2000)
/// PRI_dsiundoc.js
if (window.parent === window) {
console.log("PRI_dsiundoc.js");
window.addEventListener('load', _ => {
const elt = document.querySelector('#dokuwiki__content h1')
if (elt?.innerText) document.title = elt.innerText
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment