diff --git a/ui/js/lbry.js b/ui/js/lbry.js index 2f1d2d8ad..9f9dc0e51 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -37,7 +37,6 @@ let lbry = { debug: false, useCustomLighthouseServers: false, customLighthouseServers: [], - showDeveloperMenu: false, language: "en", theme: "light", themes: [], @@ -230,9 +229,6 @@ lbry.publishDeprecated = function( lbry.getClientSetting = function(setting) { var localStorageVal = localStorage.getItem("setting_" + setting); - if (setting == "showDeveloperMenu") { - return true; - } return localStorageVal === null ? lbry.defaultClientSettings[setting] : JSON.parse(localStorageVal); @@ -242,13 +238,6 @@ lbry.setClientSetting = function(setting, value) { return localStorage.setItem("setting_" + setting, JSON.stringify(value)); }; -lbry.formatName = function(name) { - // Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes) - name = name.replace("/s+/g", "-"); - name = name.toLowerCase().replace(lbryuri.REGEXP_INVALID_URI, ""); - return name; -}; - lbry.imagePath = function(file) { return "img/" + file; }; @@ -279,17 +268,6 @@ lbry.getMediaType = function(contentType, fileName) { } }; -lbry.showMenuIfNeeded = function() { - const showingMenu = sessionStorage.getItem("menuShown") || null; - const chosenMenu = lbry.getClientSetting("showDeveloperMenu") - ? "developer" - : "normal"; - if (chosenMenu != showingMenu) { - menu.showMenubar(chosenMenu == "developer"); - } - sessionStorage.setItem("menuShown", chosenMenu); -}; - lbry.getAppVersionInfo = function() { return new Promise((resolve, reject) => { ipcRenderer.once("version-info-received", (event, versionInfo) => { diff --git a/ui/js/main.js b/ui/js/main.js index e8a3221a0..9c6059366 100644 --- a/ui/js/main.js +++ b/ui/js/main.js @@ -16,14 +16,12 @@ const { remote, ipcRenderer, shell } = require("electron"); const contextMenu = remote.require("./menu/context-menu"); const app = require("./app"); -lbry.showMenuIfNeeded(); - window.addEventListener("contextmenu", event => { contextMenu.showContextMenu( remote.getCurrentWindow(), event.x, event.y, - lbry.getClientSetting("showDeveloperMenu") + env === "development" ); event.preventDefault(); }); diff --git a/ui/js/page/developer.js b/ui/js/page/developer.js index 4b69df173..970a0d3e7 100644 --- a/ui/js/page/developer.js +++ b/ui/js/page/developer.js @@ -11,7 +11,6 @@ class DeveloperPage extends React.PureComponent { super(props); this.state = { - showDeveloperMenu: lbry.getClientSetting("showDeveloperMenu"), useCustomLighthouseServers: lbry.getClientSetting( "useCustomLighthouseServers" ), @@ -22,14 +21,6 @@ class DeveloperPage extends React.PureComponent { }; } - handleShowDeveloperMenuChange(event) { - lbry.setClientSetting("showDeveloperMenu", event.target.checked); - lbry.showMenuIfNeeded(); - this.setState({ - showDeveloperMenu: event.target.checked, - }); - } - handleUseCustomLighthouseServersChange(event) { lbry.setClientSetting("useCustomLighthouseServers", event.target.checked); this.setState({ @@ -71,19 +62,6 @@ class DeveloperPage extends React.PureComponent {

{__("Developer Settings")}

-
- -