meh.com Adv. Portrait Editor - Power User Edition

Advanced portrait-orientation editor for the meh.com forums, button selection inspired by @Thumperchick

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        meh.com Adv. Portrait Editor - Power User Edition
// @namespace   https://meh.com
// @description Advanced portrait-orientation editor for the meh.com forums, button selection inspired by @Thumperchick
// @include     https://*meh.com/forum*
// @version     1
// ==/UserScript==

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('@media screen and (max-width:576px) { #add-comment-desktop { display: block; margin: 32px auto; width: 304px; } .editor textarea { font-size: 100% !important; height: 73px !important } li[id*="wmd-bold-button"], li[id*="wmd-italic-button"], .wmd-spacer1, li[id*="wmd-code-button"], li[id*="wmd-heading-button-reply"], li[id*="wmd-hr-button-reply"], .wmd-spacer3, li[id*="wmd-undo-button"], li[id*="wmd-redo-button"], .wmd-spacer4, li[id*="wmd-emoji-button"], #add-comment-mobile-footer { display: none; } li[id*="wmd-link-button"], li[id*="wmd-quote-button"] { margin-left: -75px; } li[id*="wmd-image-button"], li[id*="wmd-olist-button"], li[id*="wmd-ulist-button"], li[id*="wmd-heading-button"], li[id*="wmd-hr-button"] { margin-left: -100px; } .wmd-spacer2 { margin-left: -89px; }}');