-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAutoOpenSidebarMenu.user.js
47 lines (43 loc) · 1.74 KB
/
AutoOpenSidebarMenu.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// ==UserScript==
// @name Automatically open the Mod panel on DEV.
// @namespace https://dev.to
// @version 0.6
// @description Automatically open the Mod panel on DEV.
// @author Thomas Bnt
// @icon https://icons.duckduckgo.com/ip3/dev.to.ico
// @match https://dev.to/*
// @match https://community.codenewbie.org/*
// @match https://forem.dev/*
// @match https://community.ops.io/*
// @match https://community.interledger.org/*
// @match https://www.wasm.builders/*
// @match https://community.webcomponents.dev/*
// @match https://forem.julialang.org/*
// @match https://community.tidelift.com/*
// @match https://www.coss.community/*
// @match https://www.metapunk.to/*
// @match https://www.joinforest.com/*
// @match https://the.community.club/*
// @match https://www.thismmalife.com/*
// @match https://www.1vibe.com/*
// @match https://www.flowstate.to/*
// @match https://aws.newbie.tips/*
// @match https://www.developmenthackers.com/*
// @homepageURL https://github.com/devtotools/open-sidebar-mod-menu
// @updateURL https://raw.githubusercontent.com/devtotools/open-sidebar-mod-menu/main/AutoOpenSidebarMenu.user.js
// @downloadURL https://raw.githubusercontent.com/devtotools/open-sidebar-mod-menu/main/AutoOpenSidebarMenu.user.js
// @grant window.onurlchange
// @noframes
// ==/UserScript==
// See at https://github.com/forem/forem/blob/main/app/javascript/actionsPanel/initializeActionsPanelToggle.js#L19
(function () {
"use strict";
// If in the URL we have ?preview=, don't open the menu
if (window.location.href.indexOf("?preview=") > -1) return false;
document
.getElementById("mod-actions-menu-btn-area")
.classList.remove("hidden");
document
.getElementsByClassName("mod-actions-menu")[0]
.classList.toggle("showing");
})();