Greasy Fork Default Behavior

Add/edit scripts with syntax highlighting enabled by default and hide share stuff

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Greasy Fork Default Behavior
// @namespace   https://github.com/chriskim06/userscripts
// @description Add/edit scripts with syntax highlighting enabled by default and hide share stuff
// @match       /https://greasyfork.org/en/scripts/\w+(-|/).*/
// @match       https://greasyfork.org/en/script_versions/new
// @version     1.2.6
// ==/UserScript==

(function() {

  var textarea = document.getElementById('script_version_code');
  if (textarea !== null) {
    textarea.style.height = '560px';
  }

  var checkbox = document.getElementById('enable-source-editor-code');
  if (checkbox !== null && !checkbox.checked) {
    checkbox.checked = true;
  }

  var share = document.getElementById('share');
  if (share !== null) {
    share.style.display = 'none';
  }

})();