expand dev mode
This commit is contained in:
parent
ac2b3f18c8
commit
11edc76272
112
js/main.js
112
js/main.js
|
@ -318,7 +318,7 @@ Core.prototype.initObserver = function () {
|
|||
if(mutation.target.querySelectorAll(".emoji-picker").length) {
|
||||
var fc = mutation.target.firstChild;
|
||||
if(fc.classList.contains("popout")) {
|
||||
quickEmoteMenu.obsCallback(fc);
|
||||
//quickEmoteMenu.obsCallback(fc);
|
||||
}
|
||||
}
|
||||
if (typeof pluginModule !== "undefined") pluginModule.rawObserver(mutation);
|
||||
|
@ -1078,106 +1078,7 @@ QuickEmoteMenu.prototype.updateFavorites = function () {
|
|||
$("#bda-qem-favourite-container").replaceWith(faContainer);
|
||||
window.bdStorage.set("bdfavemotes", btoa(JSON.stringify(this.favoriteEmotes)));
|
||||
};
|
||||
// function CustomCssEditor() { }
|
||||
|
||||
// CustomCssEditor.prototype.init = function() {
|
||||
// var self = this;
|
||||
// self.hideBackdrop = false;
|
||||
// self.editor = CodeMirror.fromTextArea(document.getElementById("bd-custom-css-ta"), {
|
||||
// lineNumbers: true,
|
||||
// mode: 'css',
|
||||
// indentUnit: 4,
|
||||
// theme: 'material',
|
||||
// scrollbarStyle: 'simple'
|
||||
// });
|
||||
|
||||
// self.editor.on("change", function (cm) {
|
||||
// var css = cm.getValue();
|
||||
// self.applyCustomCss(css, false, false);
|
||||
// });
|
||||
|
||||
// var attachEditor="";
|
||||
// attachEditor += "<div id=\"bd-customcss-attach-controls\">";
|
||||
// attachEditor += " <ul class=\"checkbox-group\">";
|
||||
// attachEditor += " <li>";
|
||||
// attachEditor += " <div class=\"checkbox\" onclick=\"settingsPanel.updateSetting(this);\">";
|
||||
// attachEditor += " <div class=\"checkbox-inner\"><input id=\"bda-css-0\" type=\"checkbox\" "+(settingsCookie["bda-css-0"] ? "checked" : "")+"><span><\/span><\/div>";
|
||||
// attachEditor += " <span title=\"Update client css while typing\">Live Update<\/span>";
|
||||
// attachEditor += " <\/div>";
|
||||
// attachEditor += " <\/li>";
|
||||
// attachEditor += " <li>";
|
||||
// attachEditor += " <div class=\"checkbox\" onclick=\"settingsPanel.updateSetting(this);\">";
|
||||
// attachEditor += " <div class=\"checkbox-inner\"><input id=\"bda-css-1\" type=\"checkbox\" "+(settingsCookie["bda-css-1"] ? "checked" : "")+"><span><\/span><\/div>";
|
||||
// attachEditor += " <span title=\"Autosave css to storage when typing\">TEMPDISABLED<\/span>";
|
||||
// attachEditor += " <\/div>";
|
||||
// attachEditor += " <\/li>";
|
||||
// attachEditor += " <li>";
|
||||
// attachEditor += " <div class=\"checkbox\" onclick=\"settingsPanel.updateSetting(this);\">";
|
||||
// attachEditor += " <div class=\"checkbox-inner\"><input id=\"bda-css-2\" type=\"checkbox\" "+(customCssEditor.hideBackdrop ? "checked" : "")+"><span><\/span><\/div>";
|
||||
// attachEditor += " <span title=\"Hide the callout backdrop to disable modal close events\">Hide Backdrop<\/span>";
|
||||
// attachEditor += " <\/div>";
|
||||
// attachEditor += " <\/li>";
|
||||
// attachEditor += " <\/ul>";
|
||||
// attachEditor += " <div id=\"bd-customcss-detach-controls-buttons\">";
|
||||
// attachEditor += " <button class=\"btn btn-primary\" id=\"bd-customcss-detached-update\" onclick=\"return false;\">Update<\/button>";
|
||||
// attachEditor += " <button class=\"btn btn-primary\" id=\"bd-customcss-detached-save\" onclick=\"return false;\">Save<\/button>";
|
||||
// attachEditor += " <button class=\"btn btn-primary\" id=\"bd-customcss-detached-detach\" onclick=\"customCssEditor.detach(); return false;\">Detach</button>";
|
||||
// attachEditor += " <\/div>";
|
||||
// attachEditor += "<\/div>";
|
||||
|
||||
// this.attachEditor = attachEditor;
|
||||
|
||||
// $("#bd-customcss-innerpane").append(attachEditor);
|
||||
|
||||
// $("#bd-customcss-detached-update").on("click", function() {
|
||||
// self.applyCustomCss(self.editor.getValue(), true, false);
|
||||
// return false;
|
||||
// });
|
||||
// $("#bd-customcss-detached-save").on("click", function() {
|
||||
// self.applyCustomCss(self.editor.getValue(), false, true);
|
||||
// return false;
|
||||
// });
|
||||
|
||||
|
||||
// var detachEditor="";
|
||||
// detachEditor += "<div id=\"bd-customcss-detach-container\">";
|
||||
// detachEditor += " <div id=\"bd-customcss-detach-editor\">";
|
||||
// detachEditor += " <\/div>";
|
||||
// detachEditor += "<\/div>";
|
||||
// this.detachedEditor = detachEditor;
|
||||
// };
|
||||
|
||||
// CustomCssEditor.prototype.attach = function() {
|
||||
// $("#editor-detached").hide();
|
||||
// $("#app-mount").removeClass("bd-detached-editor");
|
||||
// $("#bd-customcss-pane").append($("#bd-customcss-innerpane"));
|
||||
// $("#bd-customcss-detached-detach").show();
|
||||
// $("#bd-customcss-detach-container").remove();
|
||||
// };
|
||||
|
||||
// CustomCssEditor.prototype.detach = function() {
|
||||
// var self = this;
|
||||
// this.attach();
|
||||
// $("#editor-detached").show();
|
||||
// $("#bd-customcss-detached-detach").hide();
|
||||
// $("#app-mount").addClass("bd-detached-editor");
|
||||
// $(".app").parent().append(this.detachedEditor);
|
||||
// $("#bd-customcss-detach-editor").append($("#bd-customcss-innerpane"));
|
||||
// };
|
||||
|
||||
// CustomCssEditor.prototype.applyCustomCss = function (css, forceupdate, forcesave) {
|
||||
// if ($("#customcss").length == 0) {
|
||||
// $("head").append('<style id="customcss"></style>');
|
||||
// }
|
||||
|
||||
// if(forceupdate || settingsCookie["bda-css-0"]) {
|
||||
// $("#customcss").html(css);
|
||||
// }
|
||||
|
||||
// if(forcesave) {
|
||||
// window.bdStorage.set("bdcustomcss", btoa(css));
|
||||
// }
|
||||
// };
|
||||
/* BetterDiscordApp Settings Panel JavaScript
|
||||
* Version: 2.0
|
||||
* Author: Jiiks | http://jiiks.net
|
||||
|
@ -1496,6 +1397,8 @@ PluginModule.prototype.rawObserver = function(e) {
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* BetterDiscordApp ThemeModule JavaScript
|
||||
* Version: 1.0
|
||||
* Author: Jiiks | http://jiiks.net
|
||||
|
@ -1605,9 +1508,9 @@ BdApi.getCore = function () {
|
|||
debugger;
|
||||
}
|
||||
});
|
||||
/*
|
||||
$(window).on("mousedown.bdDevmode", function(e) {
|
||||
if(e.which !== 3) return;
|
||||
|
||||
$(window).on("contexmenu.bdDevmode", function(e) {
|
||||
//if(e.which !== 3) return;
|
||||
var parents = [];
|
||||
$(e.toElement).parents().addBack().not('html').each(function() {
|
||||
var entry = "";
|
||||
|
@ -1622,7 +1525,7 @@ BdApi.getCore = function () {
|
|||
var cm = $(".context-menu");
|
||||
if(cm.length <= 0) {
|
||||
return;
|
||||
cm = $("body").append('<div class="context-menu"></div>');
|
||||
//cm = $("body").append('<div class="context-menu"></div>');
|
||||
}
|
||||
|
||||
var cmo = $("<div/>", {
|
||||
|
@ -1647,7 +1550,6 @@ BdApi.getCore = function () {
|
|||
|
||||
e.stopPropagation();
|
||||
});
|
||||
*/
|
||||
};
|
||||
|
||||
devMode.prototype.disable = function() {
|
||||
|
|
Loading…
Reference in New Issue