Last active
November 26, 2023 20:35
-
-
Save berteh/88cfaaf4ca7e34b77cd7e91624fc12bc to your computer and use it in GitHub Desktop.
beautify boiteachansons.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Boite a Chansons beautify, great to print/export songsbooks with chords. | |
// @version 1.1 | |
// @match https://www.boiteachansons.net/* | |
// @icon https://www.boiteachansons.net/favicon-32x32.png | |
// @downloadURL https://gist.github.com/berteh/88cfaaf4ca7e34b77cd7e91624fc12bc/raw/boiteachansons-beautify.user.js | |
// @grant none | |
// ==/UserScript== | |
const css = ` | |
span.interl{ | |
top: -0.85em !important; | |
} | |
div.pLgn{ | |
line-height: 1.8em !important; | |
} | |
/* print only */ | |
.dCadreImpression #dCadreDiagAccords, .dCadreImpression #dMessageUsage, | |
.dCadreImpression:not(:first-of-type) table, .dCadreImpression hr.hrSeparateurImpr{ | |
display: none; | |
} | |
.dCadreImpression span.tab { | |
font-size: 60%; | |
}`; | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle(css); | |
var usage = document.querySelector("#dMessageUsage"); | |
usage.setAttribute('id','dMessageUsageNew'); | |
document.getElementById('ConnectiveDocSignExtentionInstalled').before(usage); | |
unsafeWindow.console.log("layout beautification complete"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment