Skip to content

Instantly share code, notes, and snippets.

@socrateslee
Last active January 9, 2020 11:23
Show Gist options
  • Save socrateslee/751c6670c59d5b9cdbd8428fab493375 to your computer and use it in GitHub Desktop.
Save socrateslee/751c6670c59d5b9cdbd8428fab493375 to your computer and use it in GitHub Desktop.
Wider Yuque
// ==UserScript==
// @name Wider Yuque
// @namespace https://gist.github.com/socrateslee/751c6670c59d5b9cdbd8428fab493375
// @version 0.1
// @description Let yuque a bit wider on browser screen.
// @author github.com/socrateslee
// @include https://*.yuque.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var css = `
.lake-common-sidebar {
left: calc(100% - 214px) !important ;
}
.lake-content-editor {
width: calc(100% - 428px) !important ;
}
`
var style = document.createElement('STYLE');
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
var nav = document.getElementById("navBox");
var main = document.getElementById("main");
var content = document.getElementById("content");
if(nav && main && content){
nav.parentNode.style.width = window.getComputedStyle(nav.parentNode).minWidth;
nav.parentNode.style.paddingLeft = "0px";
main.style.maxWidth = "100%";
content.parentNode.style.maxWidth = "100%";
content.parentNode.style.width = "100%";
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment