Skip to content

Instantly share code, notes, and snippets.

@prigaux
Last active October 9, 2023 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prigaux/025961c32ae0378c3d1ac7bc1cdbe5c4 to your computer and use it in GitHub Desktop.
Save prigaux/025961c32ae0378c3d1ac7bc1cdbe5c4 to your computer and use it in GitHub Desktop.
/// PRI_assistance_dsiun.js
if (window.parent === window) {
console.log("PRI_assistance_dsiun.js");
window.addEventListener('load', _ => {
const elt = document.querySelector('.main_form input[name=name]')
if (elt?.value) document.title = elt.value
})
}
/// PRI_itopshib.js
console.log("PRI_itopshib.js");
if (document.location.pathname.startsWith('/itop/')) {
document.location.pathname = document.location.pathname.replace('/itop/', '/itopshib/')
}
/// PRI_pcn.js
console.log("PRI_pcn")
if (document.location.pathname === '/auth/login') {
setTimeout(() => document.querySelector('form').submit(), 2000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment