Last active
March 12, 2019 04:02
-
-
Save elysiumeproto/b7bd1fa77698f2e728e60b9c1372f3bf to your computer and use it in GitHub Desktop.
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 Tiny Cards | |
// @namespace https://www.thecrucible.online/ | |
// @include https://www.thecrucible.online/play* | |
// @description Tiny Cards Less Tiny | |
// @author Elysiume | |
// @version 0.1.0 | |
// @updateURL https://gist.github.com/elysiumeproto/4fbee655704c944d802aa8444b883b5e7081d492/raw/tinyCards.user.js | |
// @downloadURL https://gist.github.com/elysiumeproto/4fbee655704c944d802aa8444b883b5e7081d492/raw/tinyCards.user.js | |
// ==/UserScript== | |
const styleAnchorId = "styleAnchor_c20eefcb-c59f-4406-a423-60663590e425"; | |
function addStyle(css) { | |
// We need to create an anchor element that we can attach styles to. Check if it already exists to avoid creating multiples. | |
const style = document.getElementById(styleAnchorId) || (function() { | |
// We want a style-type element with a unique enough ID that it hopefully isn't conflicting with something. | |
const style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.id = styleAnchorId; | |
document.head.appendChild(style); | |
return style; | |
})(); | |
const sheet = style.sheet; | |
sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length); | |
}; | |
addStyle(".board-inner { zoom: 150%; } "); | |
addStyle(".player-home-row { zoom: 150%; } "); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment