NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name UkuleleCheats.com Print // @namespace http://www.kevin-busch.com/ // @copyright 2018, RaveKev (https://openuserjs.org/users/RaveKev) // @license MIT // @version 0.1 // @description Print ukulele songs beautified // @author Kevin Busch, tampermonkey@kevin-busch.com // @grant none // @include *ukulelecheats.com/*-*/ // @require http://code.jquery.com/jquery-latest.js // ==/UserScript== (function () { 'use strict'; function printIt() { $('#myButton').hide(); $('#reorderButton').hide(); $("div[data-app='share_buttons']").hide(); $("div[data-app='recommendations']").hide(); $('#disqus_thread').hide(); $('.USFBdropdown').hide(); $('.header').hide(); $('.navbar').hide(); $('.col-md-4').hide(); $('.USFBtranspose').hide(); $('footer').hide(); $("div[data-app='share_buttons']").hide(); $('.menushadow').hide(); $('.col-md-8').addClass('.col-md-12').removeClass('.col-md-8'); $('h4').hide(); $('[id$=advert-cont]').hide(); $('.boxedcontent').css('border', 'none'); $('body').css('background-color', 'white'); //$('body').css('font-size', '12px'); $('body').css('margin', '20px'); $('.USFBchordWrap').css('font-size', '12px'); print(); } function reorderName() { var title = $('.pgheadertitle').text(); title = title.replace(/\Ukulele Chords/g, ""); var titles = title.split(' – '); $('.pgheadertitle').text(titles[1] + " – " + titles[0]); } $(document).ready(function () { $('.USFBbtn')[0].click(); angular.element('ul > li:nth-child(4) a').trigger('click'); reorderName(); var zNodeReorder = document.createElement('div'); zNodeReorder.innerHTML = '<button id="reorderButton" type="button" onclick="reorderName()">Reorder Name</button>'; zNodeReorder.setAttribute('id', 'reorderContainer'); $('.boxedcontent').before(zNodeReorder); var zNode = document.createElement('div'); zNode.innerHTML = '<button id="myButton" type="button" onclick="printIt()">PrintIt!</button>'; zNode.setAttribute('id', 'myContainer'); $('.boxedcontent').before(zNode); $('#myButton').click(function () { printIt(); }); $('#reorderButton').click(function () { reorderName(); }); }); })();