This file contains hidden or 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 Editor | |
// @match * | |
// @run-at document-start | |
// ==/UserScript== | |
function editorInit() { | |
//https://github.com/yabwe/medium-editor |
This file contains hidden or 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 Translate Page | |
// @match * | |
// @run-at context-menu | |
// ==/UserScript== | |
const TRANSLATE_TO_LANG = 'en' | |
function isVisible (el) { | |
// https://github.com/jquery/jquery/blob/305f193aa57014dc7d8fa0739a3fefd47166cd44/src/css/hiddenVisibleSelectors.js |
This file contains hidden or 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
function getAdjustedFontSpacing () { | |
var sampleString = 'a b c d e f g h i j klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!@#$%^&*()_+' | |
var testElement = document.createElement('span') | |
testElement.style.visibility = 'hidden' | |
testElement.style.fontWeight = '400' | |
testElement.textContent = sampleString | |
document.body.appendChild(testElement) |