Skip to content

Instantly share code, notes, and snippets.

@elysiumeproto
Last active March 12, 2019 04:02
Show Gist options
  • Save elysiumeproto/b7bd1fa77698f2e728e60b9c1372f3bf to your computer and use it in GitHub Desktop.
Save elysiumeproto/b7bd1fa77698f2e728e60b9c1372f3bf to your computer and use it in GitHub Desktop.
// ==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