Last active
November 9, 2022 13:33
-
-
Save spidersouris/71deccc97d58de153e21fcc024a6ab38 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 Crowdin Prewrap | |
// @namespace https://gist.github.com/Spidersouris/d5fe69384b25fc9e9ae7282361e9fe17 | |
// @version 0.4 | |
// @description defines "white-space: pre-wrap" to pre on Crowdin | |
// @author Enzo Doyen | |
// @match https://crowdin.com/* | |
// @match https://valve.crowdin.com/* | |
// @grant none | |
// ==/UserScript== | |
(function init(){var el = document.getElementById('translation');if (el) { el.style.removeProperty('padding-bottom'); } else { setTimeout(init, 0);}})(); | |
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('pre { white-space: pre-wrap !important; }'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment