Skip to content

Instantly share code, notes, and snippets.

@berteh
Last active November 26, 2023 20:35
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 berteh/88cfaaf4ca7e34b77cd7e91624fc12bc to your computer and use it in GitHub Desktop.
Save berteh/88cfaaf4ca7e34b77cd7e91624fc12bc to your computer and use it in GitHub Desktop.
beautify boiteachansons.net
// ==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