module.exports = (Plugin, Api, Vendor) => { if (typeof BDFDB !== "object") global.BDFDB = {$: Vendor.$, BDv2Api: Api}; const {$} = Vendor; return class extends Plugin { initConstructor () { this.labels = {}; this.updateFolders = false; this.css = ` ${BDFDB.dotCN.guild}.folder ${BDFDB.dotCN.avataricon} { background-clip: padding-box; background-position: 50%; background-size: cover !important; } .${this.name}-modal .ui-icon-picker-icon { position: relative; width: 70px; height: 70px; border: 4px solid transparent; border-radius: 12px; margin: 0; } .${this.name}-modal .ui-icon-picker-icon .ui-picker-inner { margin: 5px 5px; width: 60px; height: 60px; background-repeat: no-repeat; background-clip: padding-box; background-position: 50%; background-size: cover; border-radius: 12px; } .${this.name}-modal .ui-icon-picker-icon.selected ${BDFDB.dotCN.hovercardbutton} { display: none !important; } .${this.name}-modal .ui-icon-picker-icon ${BDFDB.dotCN.hovercardbutton} { position: absolute; top: -10px; right: -10px; } .${this.name}-modal .ui-icon-picker-icon.preview.nopic .ui-picker-inner { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAz40lEQVR4Xu3d+5ed5X2m+ev77r1LEojz+SRUVRI6HjgZHwgHVUkC7La7nUzSjuOkVzrpnsYxMU5Pklkz8cTunqyZTK+JcRvb6SS9ZrqTtJ3E2I7tGINUEuAOjmGMpNIJnYU4GYzBMkIIae/3mcVCtazFWsGI2rvqeeu9Pv8Bix++t56991VMUZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkBVPQvvm3AJCmHyWISCRIpKOnH+Ky+x/keJIkPf/+Qc74N7vZ+z8PUaRGAKRI6WjRhBRc9sjdDoCc7FmyAqBBcAZwQYJZwEXAecBZwEygCSTgCHAAeA74PvB4wOMJngmKFyExMLqaqUuStGvpSiIRQTolwXkEs4CLgfOBs4HTgFZAJGgDLwI/BJ4BngD2A09D/AhSOTi6xgEwEXZfsYrO+afQePLATGA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NiJkJTgo4OSX6gCKgTMErwEsBL6XES8ArAPX+Db8k6cnG2/jR289gxsE2KUUREQEAiZSiPOnwjNRuHeWSrd8if5IkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIk6f8HUSShlN1PTAcAAAAASUVORK5CYII=); } ${BDFDB.dotCN.guild}.folder ${BDFDB.dotCN.badge}.folder.count { background: grey; height: 12px; top: -3px; right: 30px; } ${BDFDB.dotCN.guild}.serverFoldersPreview { position: absolute; opacity: 0.5; width: 50px; height: 50px; } ${BDFDB.dotCN.guild}.serverFoldersPreview ${BDFDB.dotCN.badge} { display: none; } ${BDFDB.dotCN.guild}.serverFoldersPreview ${BDFDB.dotCN.avataricon} { background-color: transparent !important; overflow: hidden; } ${BDFDB.dotCN.guildswrapper}.folderopen ${BDFDB.dotCN.guilds} { position: static !important; } ${BDFDB.dotCN.guildswrapper}.folderopen ${BDFDB.dotCN.guilds}::-webkit-scrollbar { display: none !important; } .foldercontainer { max-height: 98%; max-width: 98%; position: absolute; top: 0px; left: 0px; z-index: 1000; } .foldercontainer::-webkit-scrollbar { display: none; } .foldercontainer ${BDFDB.dotCN.guild}:not(${BDFDB.dotCN.guildselected}) ${BDFDB.dotCN.guildinner} { border-radius: 25px !important; transition: border-radius 1s; } .foldercontainer ${BDFDB.dotCN.guild + BDFDB.dotCN.guildselected} ${BDFDB.dotCN.guildinner}, .foldercontainer ${BDFDB.dotCN.guild}:not(${BDFDB.dotCN.guildselected}) ${BDFDB.dotCN.guildinner}:hover { border-radius: 15px !important; transition: border-radius 1s; } .foldercontainer ${BDFDB.dotCN.guild}:not(.selected) .guild-inner[style*="background-color:"] { background-color: rgb(47, 49, 54); } .foldercontainer ${BDFDB.dotCN.guild + BDFDB.dotCN.guildselected} ${BDFDB.dotCN.guildinner}[style*="background-color:"] { background-color: rgb(114, 137, 218); }`; this.serverContextEntryMarkup = `
REPLACE_servercontext_serverfolders_text
`; this.serverContextSubMenuMarkup = `
REPLACE_serversubmenu_createfolder_text
REPLACE_serversubmenu_removefromfolder_text
`; this.folderContextMarkup = `
REPLACE_foldercontext_unreadfolder_text
REPLACE_foldercontext_autounreadfolder_text
REPLACE_foldercontext_foldersettings_text
REPLACE_foldercontext_createfolder_text
REPLACE_foldercontext_removefolder_text
`; this.folderIconMarkup = `
`; this.folderSettingsModalMarkup = `

REPLACE_modal_header_text

REPLACE_modal_tabheader1_text
REPLACE_modal_tabheader2_text
REPLACE_modal_tabheader3_text
REPLACE_modal_tabheader4_text

REPLACE_modal_foldername_text

REPLACE_modal_iconpicker_text

REPLACE_modal_colorpicker1_text

REPLACE_modal_colorpicker2_text

REPLACE_modal_colorpicker3_text

REPLACE_modal_colorpicker4_text

REPLACE_modal_customopen_text

REPLACE_modal_customclosed_text

REPLACE_modal_custompreview_text

`; this.folderIcons = [ {"openicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAB2ElEQVR4Xu2Z4W6DMAwG4f0fmqloq0YJw0dIhLPb7y+qfT0Hr8yTf2ECczhpcBIWkEBYwgIEQFSzhAUIgKhmCQsQAFHNEhYgAKKaJSxAAETvMGsBn1eK3lFDZQmx4zWF1kL6rLCmlli3lamrBd4N6qeNq/VUYogdv1JcK1CPByasmFRrisJqbdWj7RLWAGaBFi5FqSSPHsNLBOAhDIwe6HVnwb4vx1H/KDxN02iw0ENOWGAjEJaw0B0WFiYc/P547yzwPYwI66j9nUiadW7Km5GwzmG91wthCStGAKRWqbqatSw5ng/zXL7bu8FKDKr/nSWs4NAnB9XXLGEFrXrFksPqt5QmB7XZGJo/DZPD2vBpCis5qN0eKqzXZr5fQosLezNYo1nV9N8dYYG3O8lhFSeuyRgmB3U4ccLaL9eHTG6HNapVTS745LD+lEeztmPYD9bIVt0+hsLaanr4I3pyUCFxbruzksMKcQiFfsk1qlkhDqHQGaz/YFVoTj8W3Bwv/sBP3uTdKTVr/Umd1f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U8xB6xSZfZwFwIVrru1/Cf/erVRvMZqkuS1RnU5zZRJDftWWD9qrqwPHf74iKGl5duMb7ShmDtPERvV6QXqEs2eLA+O8LpngWWE6vFFjx6HArd4HtOVfieBdb6DuZwzwLLiNU7VGgbgpU/ROy2IVhGrBGgwtoQrPJzfLENwTJijQIV0oZg7b9Ky9oQLCPWSFDVbQjW8dvsVRuC5cTq7d1VicH9Pmt7shax1I9EwFqv+qEHWN/GGqEFq24dlgsC1smzIVjnXwxk33KPkqqQNgTL8Gx4HsKmKkx3BaaixbTt/1LRjpXZwFz4mjtY7YTg3itVk3Xv1d48OljCAoAFliAglJIssAQBoZRkgSUICKUkCyxBQCglWWAJAkIpyQJLEBBKfwAHhexMOBnKeAAAAABJRU5ErkJggg==", "closedicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAABj0lEQVR4Xu3b2w6CMBBF0fb/PxpDgsQAMbOnExtw+3zoZfUoxGhvvsICPZw02MQCJRBLLCAAojZLLCAAojZLLCAAojZLLCAAojZLLCAAotlmLWCOz2h2vuR0tZdlFp+Feq88M2ftrpOj0YWPQt0abAhrWeJ2vZ+monMn+1B3GV3wrkOg9jqdwep2wkeie8ffZw1hrfu5aBjfZt0VCAyFW2vDWHcGm4JVVww+0shn599hXTQ7bBAObmdY8jbkfai94tCusEE4KFbL3w1rz3rqaOHChIPHZk3dXu3kYYNwUKzBt2HmKb62FHw0Hx2gmXdDACaWWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARG2WWEAARH/erHVt/jDk+wnF/yUATnpyNPyzq3Bw25BY8GSfBIbKgsIQ9XFxscCRiiUWEABRmyUWEABRmyUWEABRmyUWEABRmyUWEABRmyUWEABRmwWwXiH/oUz3h3vUAAAAAElFTkSuQmCC"}, {"openicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYA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QIhiFrAEAkL0C09hh0yOgU58AAAAAElFTkSuQmCC", "closedicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAABv0lEQVR4Xu2aYW7CMBSDX26ChHabXZfbTJN2kqKCNpCg+Jk0axp9/MVpky+220JL8EkTKGklwgCWYQJgAcsgYEhxFrAMAoYUZwHLIGBIcRawDAKGFGcByyBgSHFWA1iTccys9BARP1lxD7qMs1qA+l175vw9cLrMITPZlrA+I+LUDQ0xka1hZTesC57AMrahB1i7cVdPsOa5tOxHw0PPpb3Aql5I5QEyHDa/GlaucdXhx4j4fnXEDNGuo7EiLnmTDKwb7Y+I+FrNWdM0rslKKdI4UnB/hQKWDv2fnYAFrOtD8n/EMHEOvR0bK+bENIc1Aqi7fZL9LQWvCh5Yj5FYLHhgAWuxQYnhDY1kIQV0lkETWMB61ksyZVKAs3AWzqp8apIpkwJiSAyJITGsJGAMl5UkBXQWnUVnGZEDFrAqCRjDZX9LwVLBD/Yr6eUPHgVWCnp/DUgt0PhespACYL1562Ds0h6l0jhSgLNwVvv7rD1my5izTJkUEENiSAyNyDWDNR943Pcjr9gydZQTVe7YMMNTRIdZbeVCgGUABBawDAKGFGcByyBgSHEWsAwChhRnAcsgYEhxFrAMAoYUZxmwzq8phkz4oCrBAAAAAElFTkSuQmCC"}, {"openicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAByElEQVR4Xu3Z0XaDIBCE4fj+D21OepqkWnRnZPUA/rntxuDnsICdHnxkgUmupPABlhECsMAyBIxSkgWWIWCUkiywDAGjlGSBZQgYpSQLLEPAKCVZJ2PNxvWV0m4emDvQbKg3pjsO5SGk1ziDPAuqGzAV62yoLsBaw3qhqWNKn2bRBdWBXZWsphPWKlb0kDP+rt7757fUL1ydrAwM9RqqgdwfRsaS+6SqCpax8oyOJaWLZH07W2gRFvxei2QxDRcLZhicsKAmWfPcdiCnaXH7oUVYcASrdaStDdi00lvXpWP1CvU5Z+2AgVWI2VbCUrF6T1WULrBIlnqGLtcxDQ2/07FG6Vc/h8SNFTGtZ4H1jW64FQfrhlh7u3im4arxg5WwEkpvB5WD9B36FVjG7h0ssIwGZTR3knU11l2ae0qywPo/7TePO2CBVVwlqo87oyQr+s9Odc8aBWrvHdbfiFUlC6zynq7Y4MG6IZbSr6p61t1S5WC9ahdTEaz9M+iQWOoUdJO1SNcIyXKgjmC9szf3juVC1WAdf2nU8TfVTWnHt5g3dLAMS7DAMgSMUpIFliFglJIssAwBo5RkgWUIGKUkCyxDwCglWQbWE/kykkzUi2UWAAAAAElFTkSuQmCC", "closedicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAABZklEQVR4Xu3awZKCMBQFUfL/Hx0rKizccNtKKHjVs/WKeGh0FrbNv1igxUuHm1ggArHEAgJgalliAQEwtSyxgACYWpZYQABMLUssIACmlrUYq4PjJ9PHXDB6orOhdkx6HslFmL4hJ7kK6jFgKdZqqEeA3Q1roKXnNP02OztgemJXlXXrwv7C6v1qu7Nrzh9vraXv/Th4+oS3TgWkX1aCFmNVhDru+bAyscY3ykysXjmrb14JWFSWWB9RsSxrzb8SlmVZlsUFwDP8NhQLCICpZYkFBMDUssQCAmBqWWIBATC1LLGAAJhallhAAEwtSywgAKaWJRYQAFPLEgsIgKlliQUEwNSyxAICYGpZYgEBMLUssYAAmE4ra7xm5d9oJVDDIPoVjVifRGOsqmBpVRhr/wiocEsSpP19o7LA52XJqVjgsoolFhAAU8sSCwiAqWWJBQTA1LLEAgJgalliAQEwtSyxgACYvgCckKpMkaN7zAAAAABJRU5ErkJggg=="}, {"openicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAABrklEQVR4Xu3ayZLCMAxFUfz/H50upnQanFjXdi8SXba8TAdJGBfl5issUMJJgzexQBGIJRYQAFErSywgAKJWllhAAEStLLGAAIhaWWIBARC1ssQCA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YII="} ]; this.defaults = { settings: { closeOtherFolders: {value:false, description:"Close other Folders when opening a Folder."}, closeTheFolder: {value:false, description:"Close the Folder when selecting a Server."}, closeAllFolders: {value:false, description:"Close All Folders when selecting a Server."}, forceOpenFolder: {value:false, description:"Force a Folder to open when switching to a Server of that Folder."}, showCountBadge: {value:true, description:"Display Badge for Amount of Servers in a Folder."} } }; } onStart () { var libraryScript = null; if (typeof BDFDB !== "object" || typeof BDFDB.isLibraryOutdated !== "function" || BDFDB.isLibraryOutdated()) { libraryScript = document.querySelector('head script[src="https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js"]'); if (libraryScript) libraryScript.remove(); libraryScript = document.createElement("script"); libraryScript.setAttribute("type", "text/javascript"); libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js"); document.head.appendChild(libraryScript); } this.startTimeout = setTimeout(() => {this.initialize();}, 30000); if (typeof BDFDB === "object" && typeof BDFDB.isLibraryOutdated === "function") this.initialize(); else libraryScript.addEventListener("load", () => {this.initialize();}); return true; } initialize () { if (typeof BDFDB === "object") { BDFDB.loadMessage(this); var observer = null; observer = new MutationObserver((changes, _) => { changes.forEach( (change, i) => { var serverObj = this.getParentObject(change.target, "guild"); var folderDiv = this.getFolderOfServer(serverObj); if (folderDiv) { this.updateCopyInFolderContent(serverObj, folderDiv); this.updateFolderNotifications(folderDiv); } } ); }); BDFDB.addObserver(this, null, {name:"badgeObserver",instance:observer,multi:true}, {characterData:true,subtree:true}); observer = new MutationObserver((changes, _) => { changes.forEach( (change, i) => { if (change.addedNodes) { change.addedNodes.forEach((node) => { if (node && node.nodeType == 1 && node.className.includes(BDFDB.disCN.contextmenu)) { this.onContextMenu(node); } }); } } ); }); BDFDB.addObserver(this, BDFDB.dotCN.appmount, {name:"serverContextObserver",instance:observer}, {childList: true}); observer = new MutationObserver((changes, _) => { changes.forEach( (change, i) => { if (change.type == "attributes" && change.attributeName == "class") { var serverObj = this.getParentObject(change.target, "guild"); var folderDiv = this.getFolderOfServer(serverObj); if (folderDiv) { this.updateCopyInFolderContent(serverObj, folderDiv); this.updateFolderNotifications(folderDiv); } } if (change.addedNodes) { change.addedNodes.forEach((node) => { var serverObj = this.getParentObject(node, "guild"); var folderDiv = this.getFolderOfServer(serverObj); if (folderDiv) { this.updateCopyInFolderContent(serverObj, folderDiv); this.updateFolderNotifications(folderDiv); if (node.tagName && node.classList.contains(BDFDB.disCN.badge)) { BDFDB.addObserver(this, node, {name:"badgeObserver",multi:true}, {characterData:true,subtree:true}); } $(serverObj.div).attr("folder",folderDiv.id).hide(); } }); } if (change.removedNodes) { change.removedNodes.forEach((node) => { var isBadge = $(node).hasClass(BDFDB.disCN.badge); var serverObj = this.getParentObject(isBadge ? change.target : node, "guild"); var folderDiv = this.getFolderOfServer(serverObj); if (folderDiv) { if (isBadge) this.updateCopyInFolderContent(serverObj, folderDiv); else $("#copy_of_" + serverObj.id).remove(); this.updateFolderNotifications(folderDiv); } }); } } ); }); BDFDB.addObserver(this, BDFDB.dotCN.guilds, {name:"serverListObserver",instance:observer}, {childList: true, attributes: true, subtree: true}); document.querySelectorAll(BDFDB.dotCN.badge + ":not(.folder):not(.copy)").forEach((badge) => { BDFDB.addObserver(this, badge, {name:"badgeObserver",multi:true}, {characterData:true,subtree:true}); }); $(BDFDB.dotCN.guilds).on("click." + this.name, BDFDB.dotCN.guildseparator + " ~ div" + BDFDB.dotCN.guild + ":not(.folder)", () => { if (BDFDB.getData("closeAllFolders", this, "settings")) { document.querySelectorAll(".folder.open").forEach(openFolder => {this.openCloseFolder(openFolder);}); } }); // PATCH OLD DATA REMOVE AFTER SOME TIME var customIcons = BDFDB.loadData("customicons", this, "customicons") || []; if (customIcons.length > 0) { BDFDB.showToast("Patching old ServerFolders data. This may take a minute. Do not close Discord.", {type:"warn"}); let folders = BDFDB.loadAllData(this, "folders"); this.folderIcons.forEach(pair => { pair.custom = false; }); customIcons.forEach(pair => { pair.custom = true; pair.customID = this.generateID("customicon", "customicons"); BDFDB.saveData(pair.customID, {"openicon":pair.openicon,"closedicon":pair.closedicon,"customID":pair.customID}, this, "customicons"); }); var icons = this.folderIcons.concat(customIcons); for (var id in folders) { var folder = folders[id]; if (icons[folder.iconID].custom) { folder.iconID = icons[folder.iconID].customID; BDFDB.saveData(id, folder, this, "folders"); } } BDFDB.removeData("customicons", this, "customicons"); } setTimeout(() => { this.addDragListener(); this.loadAllFolders(); },5000); return true; } else { console.error(`%c[${this.name}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!'); return false; } } onStop () { if (typeof BDFDB === "object") { this.resetAllElements(); BDFDB.unloadMessage(this); return true; } else { return false; } } onSwitch() { if (typeof BDFDB === "object") { if (BDFDB.getData("forceOpenFolder", this, "settings")) { var serverObj = BDFDB.getSelectedServer(); if (!serverObj) return; var folderDiv = this.getFolderOfServer(serverObj); if (!folderDiv || folderDiv.classList.contains("open")) return; this.openCloseFolder(folderDiv); } } } // begin of own functions updateSettings (settingspanel) { var settings = {}; for (var input of settingspanel.querySelectorAll(BDFDB.dotCN.switchinner)) { settings[input.value] = input.checked; } BDFDB.saveAllData(settings, this, "settings"); this.updateFolders = true; } resetAll () { if (confirm("Are you sure you want to delete all folders?")) { BDFDB.removeAllData(this, "folders"); this.resetAllElements(); } } removeAllIcons () { if (confirm("Are you sure you want to remove all custom icons?")) { BDFDB.removeAllData(this, "customicons"); } } resetAllElements () { $(".foldercontainer").remove(); $(BDFDB.dotCN.guild + ".folder").remove(); $(".serverFoldersPreview").remove(); BDFDB.readServerList().forEach(serverObj => $(serverObj.div).removeAttr("folder").show()); $(".folderopen").removeClass("folderopen"); BDFDB.removeLocalStyle("ChannelSizeCorrection"); } changeLanguageStrings () { this.serverContextEntryMarkup = this.serverContextEntryMarkup.replace("REPLACE_servercontext_serverfolders_text", this.labels.servercontext_serverfolders_text); this.serverContextSubMenuMarkup = this.serverContextSubMenuMarkup.replace("REPLACE_serversubmenu_createfolder_text", this.labels.serversubmenu_createfolder_text); this.serverContextSubMenuMarkup = this.serverContextSubMenuMarkup.replace("REPLACE_serversubmenu_removefromfolder_text", this.labels.serversubmenu_removefromfolder_text); this.folderContextMarkup = this.folderContextMarkup.replace("REPLACE_foldercontext_unreadfolder_text", this.labels.foldercontext_unreadfolder_text); this.folderContextMarkup = this.folderContextMarkup.replace("REPLACE_foldercontext_autounreadfolder_text", this.labels.foldercontext_autounreadfolder_text); this.folderContextMarkup = this.folderContextMarkup.replace("REPLACE_foldercontext_foldersettings_text", this.labels.foldercontext_foldersettings_text); this.folderContextMarkup = this.folderContextMarkup.replace("REPLACE_foldercontext_createfolder_text", this.labels.serversubmenu_createfolder_text); this.folderContextMarkup = this.folderContextMarkup.replace("REPLACE_foldercontext_removefolder_text", this.labels.foldercontext_removefolder_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_header_text", this.labels.modal_header_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_foldername_text", this.labels.modal_foldername_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_tabheader1_text", this.labels.modal_tabheader1_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_tabheader2_text", this.labels.modal_tabheader2_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_tabheader3_text", this.labels.modal_tabheader3_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_tabheader4_text", this.labels.modal_tabheader4_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_iconpicker_text", this.labels.modal_iconpicker_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_colorpicker1_text", this.labels.modal_colorpicker1_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_colorpicker2_text", this.labels.modal_colorpicker2_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_colorpicker3_text", this.labels.modal_colorpicker3_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_colorpicker4_text", this.labels.modal_colorpicker4_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_customopen_text", this.labels.modal_customopen_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_customclosed_text", this.labels.modal_customclosed_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_modal_custompreview_text", this.labels.modal_custompreview_text); this.folderSettingsModalMarkup = this.folderSettingsModalMarkup.replace("REPLACE_btn_save_text", this.labels.btn_save_text); } onContextMenu (context) { if (!context || !context.tagName || !context.parentElement || context.querySelector(".serverfolders-item")) return; var info = BDFDB.getKeyInformation({"node":context, "key":"guild"}); if (info && BDFDB.getKeyInformation({"node":context, "key":"displayName", "value":"GuildLeaveGroup"})) { $(context).append(this.serverContextEntryMarkup) .on("mouseenter." + this.name, ".serverfolders-item", (e) => { this.createContextSubMenu(info, e, context); }); BDFDB.updateContextPosition(context); } } createContextSubMenu (info, e, context) { var serverObj = BDFDB.getDivOfServer(info.id); var serverContextSubMenu = $(this.serverContextSubMenuMarkup); serverContextSubMenu .on("click." + this.name, ".createfolder-item", () => { $(context).hide(); this.createNewFolder(serverObj.div); }); var folderDiv = this.getFolderOfServer(serverObj); if (folderDiv) { serverContextSubMenu .find(".removefromfolder-item") .removeClass(BDFDB.disCN.contextmenuitemdisabled) .on("click." + this.name, () => { $(context).hide(); this.removeServerFromFolder(serverObj, folderDiv); }); } BDFDB.appendSubMenu(e.currentTarget, serverContextSubMenu); } addDragListener () { $(BDFDB.dotCN.guilds) .off("mousedown." + this.name) .on("mousedown." + this.name, "div" + BDFDB.dotCN.guild + ":not(.folder):not(.copy)", (e) => { if (BDFDB.pressedKeys.includes(17)) { e.stopPropagation(); e.preventDefault(); var serverObj = this.getParentObject(e.target, "guild"); if (serverObj) { var serverPreview = serverObj.div.cloneNode(true); $(serverPreview) .appendTo(BDFDB.dotCN.appmount) .addClass("serverFoldersPreview") .offset({"left":e.clientX + 5,"top":e.clientY + 5}); $(document) .off("mouseup." + this.name).off("mousemove." + this.name) .on("mouseup." + this.name, (e2) => { var folderDiv = this.getParentObject(e2.target, "folder").div; if (folderDiv) this.addServerToFolder(serverObj, folderDiv); $(document).off("mouseup." + this.name).off("mousemove." + this.name); serverPreview.remove(); }) .on("mousemove." + this.name, (e2) => { $(serverPreview).offset({"left":e2.clientX + 5,"top":e2.clientY + 5}); }); } } }); } addServerToFolder (serverObj, folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); if (serverObj && data && !data.servers.includes(serverObj.id)) { data.servers.push(serverObj.id); BDFDB.saveData(folderDiv.id, data, this, "folders"); $(serverObj.div).attr("folder",folderDiv.id).hide(); var message = this.labels.toast_addserver_text ? this.labels.toast_addserver_text.replace("${servername}", serverObj.name).replace("${foldername}", data.folderName ? " " + data.folderName : "") : ""; BDFDB.showToast(message, {type:"success"}); this.updateCopyInFolderContent(serverObj, folderDiv); this.updateFolderNotifications(folderDiv); } } removeServerFromFolder (serverObj, folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); if (serverObj && data) { BDFDB.removeFromArray(data.servers, serverObj.id); BDFDB.saveData(folderDiv.id, data, this, "folders"); $(serverObj.div).removeAttr("folder").show(); var message = this.labels.toast_removeserver_text ? this.labels.toast_removeserver_text.replace("${servername}", serverObj.name).replace("${foldername}", data.folderName ? " " + data.folderName : "") : ""; BDFDB.showToast(message, {type:"danger"}); $("#copy_of_" + serverObj.id).remove(); this.updateFolderNotifications(folderDiv); } } createNewFolder (ankerDiv) { if (!ankerDiv) return; var folderID = this.generateID("folder", "folders"); var folderName = ""; var position = Array.from(document.querySelectorAll("div" + BDFDB.dotCN.guildseparator + " ~ div" + BDFDB.dotCN.guild)).indexOf(ankerDiv); var iconID = 0; var icons = this.folderIcons[0]; var autounread = false; var color1 = ["0","0","0"]; var color2 = ["255","255","255"]; var color3 = null; var color4 = null; var servers = []; var folderDiv = this.createFolderDiv({folderID,folderName,position,iconID,icons,autounread,color1,color2,color3,color4,servers}); this.showFolderSettings(folderDiv); this.updateFolderPositions(); } loadAllFolders () { var folders = BDFDB.loadAllData(this, "folders"); var sortedFolders = []; for (var id in folders) { sortedFolders[folders[id].position] = folders[id]; } for (var i = 0; i < sortedFolders.length; i++) { var data = sortedFolders[i]; if (data) { var folderDiv = this.createFolderDiv(data); this.readIncludedServerList(folderDiv).forEach((serverObj) => {$(serverObj.div).attr("folder",folderDiv.id).hide();}); } } } createFolderDiv (data) { var folderDiv = $(this.folderIconMarkup)[0]; $(folderDiv).insertBefore(document.querySelectorAll("div" + BDFDB.dotCN.guildseparator + " ~ div" + BDFDB.dotCN.guild)[data.position]); var avatar = folderDiv.querySelector(BDFDB.dotCN.avataricon); $(folderDiv) .addClass("closed") .attr("id", data.folderID) .on("mouseenter", () => {this.createFolderToolTip(folderDiv);}) .on("click", () => { if (BDFDB.getData("closeOtherFolders", this, "settings")) { document.querySelectorAll(".folder.open").forEach(openFolder => { if (openFolder != folderDiv) this.openCloseFolder(openFolder); }); } this.openCloseFolder(folderDiv); }) .on("contextmenu", (e) => { this.createFolderContextMenu(folderDiv, e); }) .on("mousedown." + this.name, (e) => { var mouseTimeout = null; var folderPreview = folderDiv.cloneNode(true); var hoveredElement = null; var placeholder = $(`
`)[0]; var guildswrap = document.querySelector(BDFDB.dotCN.guilds); $(folderPreview) .hide() .appendTo(BDFDB.dotCN.appmount) .addClass("serverFoldersPreview") .offset({"left":e.clientX + 5,"top":e.clientY + 5}); $(document) .off("mouseup." + this.name) .on("mouseup." + this.name, (e2) => { clearTimeout(mouseTimeout); placeholder.remove(); folderPreview.remove(); $(folderDiv).css("display",""); $(document).off("mouseup." + this.name).off("mousemove." + this.name); if (hoveredElement) { guildswrap.insertBefore(folderDiv, hoveredElement.nextSibling); this.updateFolderPositions(folderDiv); } }); mouseTimeout = setTimeout(() => { $(document) .off("mousemove." + this.name) .on("mousemove." + this.name, (e2) => { placeholder.remove(); $(folderDiv).hide(); $(folderPreview) .show() .offset({"left":e2.clientX + 5,"top":e2.clientY + 5}); hoveredElement = this.getParentObject(e2.target, "folder").div; if (hoveredElement) guildswrap.insertBefore(placeholder, hoveredElement.nextSibling); else { hoveredElement = this.getParentObject(e2.target, "guild").div; if (hoveredElement) guildswrap.insertBefore(placeholder, hoveredElement.nextSibling); } }); },100); }); $(avatar) .css("background-image", "url(\"" + data.icons.closedicon + "\")"); BDFDB.saveData(data.folderID, data, this, "folders"); this.updateFolderNotifications(folderDiv); return folderDiv; } generateID (prefix, dataname) { var data = BDFDB.loadAllData(this, dataname); var id = prefix + "_" + Math.round(Math.random()*10000000000000000); return data[id] ? this.generateID(prefix, dataname) : id; } createFolderContextMenu (folderDiv, e) { var folderID = folderDiv.id; var data = BDFDB.loadData(folderID, this, "folders"); if (data) { var folderContext = $(this.folderContextMarkup); folderContext .on("click." + this.name, ".autounreadfolder-item", (e2) => { var checkbox = $(e2.currentTarget).find("input"); var isChecked = checkbox.prop("checked"); checkbox.prop("checked", !isChecked) data.autounread = !isChecked; BDFDB.saveData(folderID, data, this, "folders"); }) .on("click." + this.name, ".foldersettings-item", () => { folderContext.remove(); this.showFolderSettings(folderDiv); }) .on("click." + this.name, ".createfolder-item", () => { folderContext.remove(); this.createNewFolder(folderDiv); }) .on("click." + this.name, ".removefolder-item", () => { folderContext.remove(); this.removeFolder(folderDiv); }) .find(".autounreadfolder-item input").prop("checked", data.autounread); var unreadServers = BDFDB.readUnreadServerList(this.readIncludedServerList(folderDiv)); if (unreadServers.length > 0) { folderContext .find(".unreadfolder-item") .removeClass(BDFDB.disCN.contextmenuitemdisabled) .on("click." + this.name, () => { folderContext.remove(); BDFDB.clearReadNotifications(unreadServers); }); } BDFDB.appendContextMenu(folderContext[0], e); } } createFolderToolTip (folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); if (data) { if (data.folderName) { var bgColor = data.color3 ? BDFDB.color2RGB(data.color3) : ""; var fontColor = data.color4 ? BDFDB.color2RGB(data.color4) : ""; var customTooltipCSS = ` body .tooltip.guild-folder-tooltip { color: ${fontColor} !important; background-color: ${bgColor} !important; } body .guild-folder-tooltip:after { border-right-color: ${bgColor} !important; }`; BDFDB.createTooltip(data.folderName, folderDiv, {type:"right",selector:"guild-folder-tooltip",css:customTooltipCSS}); } } } createServerToolTip (serverObj, target, e) { var data = BDFDB.loadData(serverObj.id, "EditServers", "servers"); var text = data ? (data.name ? data.name : serverObj.name) : serverObj.name; var bgColor = data ? (data.color3 ? BDFDB.color2RGB(data.color3) : "") : ""; var fontColor = data ? (data.color4 ? BDFDB.color2RGB(data.color4) : "") : ""; var customTooltipCSS = ` body .tooltip.guild-custom-tooltip { color: ${fontColor} !important; background-color: ${bgColor} !important; } body .tooltip.guild-custom-tooltip:after { border-right-color: ${bgColor} !important; }`; BDFDB.createTooltip(text, target, {type:"right",selector:"guild-custom-tooltip",css:customTooltipCSS}); } showFolderSettings (folderDiv) { var folderID = folderDiv.id; var data = BDFDB.loadData(folderID, this, "folders"); if (data) { var folderName = data.folderName; var position = data.position; var iconID = data.iconID; var icons = data.icons; var color1 = data.color1; var color2 = data.color2; var color3 = data.color3; var color4 = data.color4; var servers = data.servers; var folderSettingsModal = $(this.folderSettingsModalMarkup); folderSettingsModal.find(BDFDB.dotCN.modalguildname).text(folderName ? folderName : ""); folderSettingsModal.find("#input-foldername").val(folderName); folderSettingsModal.find("#input-foldername").attr("placeholder", folderName); this.setIcons(iconID, folderSettingsModal.find(".icons")); BDFDB.setColorSwatches(color1, folderSettingsModal.find(".swatches1"), "swatch1"); BDFDB.setColorSwatches(color2, folderSettingsModal.find(".swatches2"), "swatch2"); BDFDB.setColorSwatches(color3, folderSettingsModal.find(".swatches3"), "swatch3"); BDFDB.setColorSwatches(color4, folderSettingsModal.find(".swatches4"), "swatch4"); BDFDB.appendModal(folderSettingsModal); folderSettingsModal .on("change", "input[type='file'][option]", (e) => { var file = e.currentTarget.files[0]; if (file) this.fetchCustomIcon(folderSettingsModal[0], e.currentTarget.getAttribute("option")); }) .on("keyup", "input[type='text'][option]", (e) => { if (e.which == 13) this.fetchCustomIcon(folderSettingsModal[0], e.currentTarget.getAttribute("option")); }) .on("click", ".btn-addcustom", (e) => { this.saveCustomIcon(folderSettingsModal[0]); }) .on("click", ".btn-save", (e) => { folderName = null; if (folderSettingsModal.find("#input-foldername").val()) { if (folderSettingsModal.find("#input-foldername").val().trim().length > 0) { folderName = folderSettingsModal.find("#input-foldername").val().trim(); } } iconID = folderSettingsModal.find(".ui-icon-picker-icon.selected").attr("value"); color1 = BDFDB.getSwatchColor("swatch1"); color2 = BDFDB.getSwatchColor("swatch2"); color3 = BDFDB.getSwatchColor("swatch3"); color4 = BDFDB.getSwatchColor("swatch4"); if (iconID != data.iconID || !BDFDB.equals(color1, data.color1) || !BDFDB.equals(color2, data.color2)) { var folderIcons = this.loadAllIcons(); var isOpen = folderDiv.classList.contains("open"); if (!folderSettingsModal.find(".ui-icon-picker-icon.selected").hasClass("custom")) { this.changeImgColor(color1, color2, folderIcons[iconID].openicon, (openicon) => { icons.openicon = openicon; this.changeImgColor(color1, color2, folderIcons[iconID].closedicon, (closedicon) => { icons.closedicon = closedicon; $(folderDiv).find(BDFDB.dotCN.avataricon).css("background-image", isOpen ? "url(\"" + icons.openicon + "\")" : "url(\"" + icons.closedicon + "\")"); BDFDB.saveData(folderID, {folderID,folderName,position,iconID,icons,color1,color2,color3,color4,servers}, this, "folders"); }); }); } else { icons.openicon = folderIcons[iconID].openicon; icons.closedicon = folderIcons[iconID].closedicon; $(folderDiv).find(BDFDB.dotCN.avataricon).css("background-image", isOpen ? "url(\"" + icons.openicon + "\")" : "url(\"" + icons.closedicon + "\")"); BDFDB.saveData(folderID, {folderID,folderName,position,iconID,icons,color1,color2,color3,color4,servers}, this, "folders"); } } else { BDFDB.saveData(folderID, {folderID,folderName,position,iconID,icons,color1,color2,color3,color4,servers}, this, "folders"); } }); folderSettingsModal.find("#input-foldername").focus(); } } setIcons (selection, wrapper) { wrapper.find(".ui-icon-picker-icon").remove(); var folderIcons = this.loadAllIcons(); var icons = `
${Object.getOwnPropertyNames(folderIcons).map(id => `
${folderIcons[id].customID ? '
' : ''}
`).join("")}
`; $(icons).appendTo(wrapper); if (!folderIcons[selection]) { selection = 0; } wrapper.find(`.ui-icon-picker-icon[value="${selection}"]`) .addClass("selected") .css("background-color", "grey"); wrapper .off("click").off("mouseenter").off("mouseleave") .on("click", ".ui-icon-picker-icon", (e) => { if (e.target.classList.contains(BDFDB.disCN.hovercardbutton)) return wrapper.find(".ui-icon-picker-icon.selected") .removeClass("selected") .css("background-color", "transparent"); $(e.currentTarget) .addClass("selected") .css("background-color", "grey"); }) .on("click", BDFDB.dotCN.hovercardbutton, (e) => { BDFDB.removeData(e.currentTarget.getAttribute("value"), this, "customicons"); e.currentTarget.parentElement.remove(); BDFDB.showToast(`Custom Icon was deleted.`, {type:"success"}); }) .on("mouseenter", ".ui-icon-picker-icon", (e) => { $(e.currentTarget).find(".ui-picker-inner").css("background-image", "url(" + folderIcons[e.currentTarget.getAttribute("value")].openicon + ")"); }) .on("mouseleave", ".ui-icon-picker-icon", (e) => { $(e.currentTarget).find(".ui-picker-inner").css("background-image", "url(" + folderIcons[e.currentTarget.getAttribute("value")].closedicon + ")"); }); } loadAllIcons () { var icons = {}; this.folderIcons.forEach((array,i) => { icons[i] = {"openicon":array.openicon,"closedicon":array.closedicon,"customID":null}; }); Object.assign(icons, BDFDB.loadAllData(this, "customicons")); return icons; } fetchCustomIcon (modal, type) { var successFetchIcon; var url = modal.querySelector("input[type='text'][option='" + type + "']").value; if (url.indexOf("http") == 0) { let request = require("request"); request(url, (error, response, result) => { if (response) { var type = response.headers["content-type"]; if (type && type.indexOf("image") > -1) { successFetchIcon(); return; } } BDFDB.showToast("Use a valid direct link to an image source. They usually end on something like .png, .jpg or .gif.", {type:"danger"}); }); } else { let fs = require("fs") if (fs.existsSync(url)) { fs.readFile(url, (error, response) => { if (!error) { url = `data:image/png;base64,${response.toString("base64")}`; successFetchIcon(); } }); } else { BDFDB.showToast("Could not fetch file. Please make sure the file exists.", {type:"danger"}); } } successFetchIcon = () => { var iconpreview = modal.querySelector(".ui-icon-picker-icon.preview." + type); var iconpreviewinner = iconpreview.querySelector(".ui-picker-inner"); iconpreview.classList.remove("nopic"); iconpreview.url = url; iconpreviewinner.style.backgroundImage = "url(" + url + ")"; var iconpreviewopen = modal.querySelector(".ui-icon-picker-icon.preview.open"); var iconpreviewclosed = modal.querySelector(".ui-icon-picker-icon.preview.closed"); if (!iconpreviewopen.classList.contains("nopic") && !iconpreviewclosed.classList.contains("nopic")) { var iconpreviewswitching = modal.querySelector(".ui-icon-picker-icon.preview.switching"); var iconpreviewopeninner = iconpreviewopen.querySelector(".ui-picker-inner"); var iconpreviewclosedinner = iconpreviewclosed.querySelector(".ui-picker-inner"); var iconpreviewswitchinginner = iconpreviewswitching.querySelector(".ui-picker-inner"); iconpreviewswitching.classList.remove("nopic"); iconpreviewswitchinginner.style.backgroundImage = iconpreviewopeninner.style.backgroundImage; var switching = true; iconpreviewswitching.switchInterval = setInterval(() => { switching = !switching; iconpreviewswitchinginner.style.backgroundImage = switching ? iconpreviewopeninner.style.backgroundImage : iconpreviewclosedinner.style.backgroundImage; },1000); } }; } saveCustomIcon (modal) { var iconpreviewopen = modal.querySelector(".ui-icon-picker-icon.preview.open"); var iconpreviewclosed = modal.querySelector(".ui-icon-picker-icon.preview.closed"); var iconpreviewswitching = modal.querySelector(".ui-icon-picker-icon.preview.switching"); if (!iconpreviewopen.classList.contains("nopic") && !iconpreviewclosed.classList.contains("nopic") && !iconpreviewswitching.classList.contains("nopic")) { var customID = this.generateID("customicon", "customicons"); BDFDB.saveData(customID, {"openicon":iconpreviewopen.url,"closedicon":iconpreviewclosed.url,customID}, this, "customicons"); modal.querySelectorAll("input[type='text'][option]").forEach((input) => { input.value = ""; }); var iconpreviewopeninner = iconpreviewopen.querySelector(".ui-picker-inner"); var iconpreviewclosedinner = iconpreviewclosed.querySelector(".ui-picker-inner"); var iconpreviewswitchinginner = iconpreviewswitching.querySelector(".ui-picker-inner"); iconpreviewopen.classList.add("nopic"); iconpreviewopeninner.style.backgroundImage = ""; iconpreviewclosed.classList.add("nopic"); iconpreviewclosedinner.style.backgroundImage = ""; iconpreviewswitching.classList.add("nopic"); iconpreviewswitchinginner.style.backgroundImage = ""; clearInterval(iconpreviewswitching.switchInterval); BDFDB.showToast(`Custom Icon was added to selection.`, {type:"success"}); this.setIcons(modal.querySelector(".ui-icon-picker-icon.selected").getAttribute("value"), $(modal).find(".icons")); } else { BDFDB.showToast(`Add an image for the open and the closed icon.`, {type:"danger"}); } }; removeFolder (folderDiv) { this.readIncludedServerList(folderDiv).forEach((serverObj) => {$(serverObj.div).removeAttr("folder").show();}); BDFDB.removeData(folderDiv.id, this, "folders"); this.closeFolderContent(folderDiv); folderDiv.remove(); this.updateFolderPositions(); } openCloseFolder (folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); if (data) { var isOpen = folderDiv.classList.contains("open"); if (!isOpen) { var includedServers = this.readIncludedServerList(folderDiv); if (includedServers.length > 0) { $(folderDiv) .addClass("open") .removeClass("closed"); var alreadyOpen = document.querySelector(".foldercontainer"); if (!alreadyOpen) { document.body.classList.add("folderopen"); $(BDFDB.dotCN.guildswrapper).addClass("folderopen"); $(`
`).insertBefore(BDFDB.dotCN.guild + ":first"); } for (var i = 0; i < includedServers.length; i++) { this.updateCopyInFolderContent(includedServers[i], folderDiv); } if (!alreadyOpen) { var guildswrapper = $(BDFDB.dotCN.guildswrapper); var guildsscroller = guildswrapper.find(BDFDB.dotCN.guilds); var ChannelSizeCorrectionCSS = ` .foldercontainer { padding: ${guildsscroller.css("padding")}; margin: ${guildsscroller.css("margin")}; }`; if (guildswrapper.outerHeight() > guildswrapper.outerWidth()) { var columnamount = Math.floor(guildswrapper.outerWidth() / $(BDFDB.dotCN.guild).outerWidth()); ChannelSizeCorrectionCSS += ` .foldercontainer { width: ${guildswrapper.outerWidth() / columnamount}px; left: ${guildswrapper.outerWidth()}px; overflow-x: hidden !important; overflow-y: scroll !important; } body.folderopen .bd-settings-button { width: ${guildswrapper.outerWidth() + (guildswrapper.outerWidth() / columnamount)}px !important; } ${BDFDB.dotCN.guildswrapper}.folderopen { overflow: visible !important; width: ${guildswrapper.outerWidth() + (guildswrapper.outerWidth() / columnamount)}px !important; } ${BDFDB.dotCN.guildswrapper}.folderopen ${BDFDB.dotCN.scrollerwrapold}, ${BDFDB.dotCN.guildswrapper}.folderopen ${BDFDB.dotCN.guilds} { width: ${guildswrapper.outerWidth() + (guildswrapper.outerWidth() / columnamount)}px !important; }`; } else { var rowamount = Math.floor(guildswrapper.outerHeight() / $(BDFDB.dotCN.guild).outerHeight()); ChannelSizeCorrectionCSS += ` .foldercontainer ${BDFDB.dotCN.guild} { display: inline-block !important; } .foldercontainer { height: ${guildswrapper.outerHeight() / rowamount}px; bottom: ${guildswrapper.outerHeight()}px; overflow-x: scroll !important; overflow-y: hidden !important; } ${BDFDB.dotCN.guildswrapper}.folderopen { overflow: visible !important; height: ${guildswrapper.outerouterHeightWidth() + (guildswrapper.outerHeight() / rowamount)}px !important; } ${BDFDB.dotCN.guildswrapper}.folderopen ${BDFDB.dotCN.scrollerwrapold}, ${BDFDB.dotCN.guildswrapper}.folderopen ${BDFDB.dotCN.guilds} { height: ${guildswrapper.outerouterHeightWidth() + (guildswrapper.outerHeight() / rowamount)}px !important; }`; } BDFDB.appendLocalStyle("ChannelSizeCorrection", ChannelSizeCorrectionCSS); } } else return; // nothing to do when closed and empty } else { this.closeFolderContent(folderDiv); } $(folderDiv).find(BDFDB.dotCN.avataricon).css("background-image", !isOpen ? "url(\"" + data.icons.openicon + "\")" : "url(\"" + data.icons.closedicon + "\")"); } } updateCopyInFolderContent (serverObj, folderDiv) { if (!serverObj) return; var foldercontainer = document.querySelector(".foldercontainer"); if (foldercontainer && folderDiv.classList.contains("open")) { var oldCopy = foldercontainer.querySelector("#copy_of_" + serverObj.id); if (oldCopy) { foldercontainer.insertBefore(this.createCopyOfServer(serverObj, folderDiv), oldCopy); oldCopy.remove(); } else { var sameFolderCopies = foldercontainer.querySelectorAll(".content_of_" + folderDiv.id); var insertNode = sameFolderCopies.length > 0 ? sameFolderCopies[sameFolderCopies.length-1].nextSibling : null; foldercontainer.insertBefore(this.createCopyOfServer(serverObj, folderDiv), insertNode); } } } createCopyOfServer (serverObj, folderDiv) { var serverDiv = serverObj.div; var foldercontainer = document.querySelector(".foldercontainer"); var serverCopy = serverDiv.cloneNode(true); $(serverCopy) .attr("id", "copy_of_" + serverObj.id) .addClass("copy") .addClass("content_of_" + folderDiv.id) .css("display", "") .on("mouseenter." + this.name, (e) => {this.createServerToolTip(serverObj, serverCopy, e);}) .on("click." + this.name, (e) => { e.preventDefault(); if (BDFDB.pressedKeys.includes(46)) { this.removeServerFromFolder(serverObj, folderDiv); } else { var settings = BDFDB.getAllData(this, "settings"); if (settings.closeAllFolders) { document.querySelectorAll(".folder.open").forEach(openFolder => { this.openCloseFolder(openFolder); }); } else if (settings.closeTheFolder) { this.openCloseFolder(folderDiv); } serverDiv.querySelector("a").click(); } }) .on("contextmenu." + this.name, (e) => { var handleContextMenu = BDFDB.getKeyInformation({"node":serverDiv.firstElementChild, "key":"handleContextMenu"}); if (handleContextMenu) { var data = { preventDefault: a=>a, stopPropagation: a=>a, pageX: e.pageX, pageY: e.pageY, }; handleContextMenu(data); } }) .on("mousedown." + this.name, (e) => { var mouseTimeout = null; var serverPreview = serverDiv.cloneNode(true); var hoveredCopy = null; var placeholder = $(`
`)[0]; $(serverPreview) .appendTo(BDFDB.dotCN.appmount) .addClass("serverFoldersPreview") .offset({"left":e.clientX + 5,"top":e.clientY + 5}); $(document) .off("mouseup." + this.name) .on("mouseup." + this.name, (e2) => { clearTimeout(mouseTimeout); placeholder.remove(); serverPreview.remove(); $(serverCopy).css("display",""); var newFolderDiv = this.getParentObject(e2.target, "folder").div; if (newFolderDiv && newFolderDiv != folderDiv) { this.removeServerFromFolder(serverObj, folderDiv); this.addServerToFolder(serverObj, newFolderDiv); } else { if (hoveredCopy) { foldercontainer.insertBefore(serverCopy, hoveredCopy.nextSibling); this.updateServerPositions(folderDiv); } } $(document).off("mouseup." + this.name).off("mousemove." + this.name); }); mouseTimeout = setTimeout(() => { $(document) .off("mousemove." + this.name) .on("mousemove." + this.name, (e2) => { placeholder.remove(); $(serverCopy).hide(); $(serverPreview) .show() .offset({"left":e2.clientX + 5,"top":e2.clientY + 5}); if (foldercontainer.contains(e2.target)) { hoveredCopy = this.getParentObject(e2.target, "copy").div; if (hoveredCopy && hoveredCopy.classList.contains("content_of_" + folderDiv.id)) { foldercontainer.insertBefore(placeholder, hoveredCopy.nextSibling); } else hoveredCopy = null; } }); },100); }) .find("a").attr("draggable","false"); return serverCopy; } closeFolderContent (folderDiv) { $(folderDiv) .removeClass("open") .addClass("closed"); $(".content_of_" + folderDiv.id).remove(); var foldercontainer = document.querySelector(".foldercontainer"); if (foldercontainer && !foldercontainer.firstChild) { foldercontainer.remove(); $(".folderopen").removeClass("folderopen"); BDFDB.removeLocalStyle("ChannelSizeCorrection"); } } updateFolderPositions () { var serverAndFolders = document.querySelectorAll("div" + BDFDB.dotCN.guildseparator + " ~ div" + BDFDB.dotCN.guild); for (let i = 0; i < serverAndFolders.length; i++) { var folderDiv = this.getParentObject(serverAndFolders[i], "folder").div; if (folderDiv) { var folderID = folderDiv.id; var data = BDFDB.loadData(folderID, this, "folders"); if (data) { data.position = i; BDFDB.saveData(folderID, data, this, "folders"); } } } } updateServerPositions (folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); if (data) { var serversInData = data.servers; var serversInFolder = Array.from(document.querySelectorAll(".content_of_" + folderDiv.id)).map(server => {return server.id.replace("copy_of_", "");}); for (var i = 0; i < serversInFolder.length; i++) { BDFDB.removeFromArray(serversInData, serversInFolder[i]); } data.servers = serversInFolder.concat(serversInData); BDFDB.saveData(folderDiv.id, data, this, "folders"); } } updateFolderNotifications (folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); if (data) { var includedServers = this.readIncludedServerList(folderDiv); var unreadServers = BDFDB.readUnreadServerList(includedServers); if (unreadServers.length > 0 && data.autounread) { BDFDB.clearReadNotifications(unreadServers); } else { var badgeAmount = 0; var audioEnabled = false; var videoEnabled = false; includedServers.forEach((serverObj) => { let serverDiv = serverObj.div; let badge = serverDiv.querySelector(BDFDB.dotCN.badge); if (badge) badgeAmount += parseInt(badge.innerText); if (serverDiv.classList.contains(BDFDB.disCN.guildaudio)) audioEnabled = true; if (serverDiv.classList.contains(BDFDB.disCN.guildvideo)) videoEnabled = true; }); $(folderDiv) .toggleClass(BDFDB.disCN.guildunread, unreadServers.length > 0) .toggleClass(BDFDB.disCN.guildaudio, audioEnabled) .toggleClass(BDFDB.disCN.guildvideo, videoEnabled); $(folderDiv) .find(".folder" + BDFDB.dotCN.badge + ".notifications") .toggle(badgeAmount > 0) .text(badgeAmount); $(folderDiv) .find(".folder" + BDFDB.dotCN.badge + ".count") .toggle(includedServers.length > 0 && BDFDB.getData("showCountBadge", this, "settings")) .text(includedServers.length); if (folderDiv.classList.contains("open") && !document.querySelector(".content_of_" + folderDiv.id)) this.openCloseFolder(folderDiv); } } } getParentObject (div, type) { if (!div) return {div:null}; if (document.querySelector(BDFDB.dotCN.dms) && document.querySelector(BDFDB.dotCN.dms).contains(div)) return {div:null}; if (div.tagName && div.querySelector(BDFDB.dotCN.guildserror)) return {div:null}; if (div.classList && div.classList.length > 0 && (div.classList.contains(BDFDB.disCN.guilds) || div.classList.contains("serverFoldersPreview"))) return {div:null}; if (div.classList && div.classList.length > 0 && div.classList.contains(BDFDB.disCN.guild) && div.classList.contains(type) && div.querySelector(BDFDB.dotCN.avataricon)) { if (type == "guild") { var info = BDFDB.getKeyInformation({"node":div, "key":"guild"}); if (info) return Object.assign({},info,{div:div,data:info}); } else { return {div}; } } return this.getParentObject(div.parentElement, type); } getFolderOfServer (serverObj) { if (!serverObj) return; var folders = BDFDB.loadAllData(this, "folders"); for (var id in folders) { var serverIDs = folders[id].servers; for (var i = 0; serverIDs.length > i; i++) { if (serverIDs[i] == serverObj.id) return document.querySelector("#" + folders[id].folderID); } } return null; } readIncludedServerList (folderDiv) { var data = BDFDB.loadData(folderDiv.id, this, "folders"); var includedServers = []; if (data) { var serverIDs = data.servers; for (var i = 0; serverIDs.length > i; i++) { var serverObj = BDFDB.getDivOfServer(serverIDs[i]); if (serverObj) includedServers.push(serverObj); } } return includedServers; } changeImgColor (color1, color2, icon, callback) { color1 = BDFDB.color2COMP(color1); color2 = BDFDB.color2COMP(color2); if (!color1 || !color2 || !icon) return; var img = new Image(); img.src = icon; img.onload = () => { if (icon.indexOf("data:image") == 0 && img.width < 200 && img.height < 200) { var can = document.createElement("canvas"); can.width = img.width; can.height = img.height; var ctx = can.getContext("2d"); ctx.drawImage(img, 0, 0); var imageData = ctx.getImageData(0, 0, img.width, img.height); var data = imageData.data; for (var i = 0; i < data.length; i += 4) { if (data[i] == 0 && data[i + 1] == 0 && data[i + 2] == 0) { data[i] = color1[0]; data[i + 1] = color1[1]; data[i + 2] = color1[2]; } else if (data[i] == 255 && data[i + 1] == 255 && data[i + 2] == 255) { data[i] = color2[0]; data[i + 1] = color2[1]; data[i + 2] = color2[2]; } ctx.putImageData(imageData, 0, 0); } callback(can.toDataURL("image/png")); } else { callback(img.src); } }; } getSettingsPanel () { var settings = BDFDB.getAllData(this, "settings"); var settingshtml = `
`; for (let key in settings) { settingshtml += `

${this.defaults.settings[key].description}

`; } settingshtml += `

Reset all Folders.

`; settingshtml += `

Remove all custom Icons.

`; settingshtml += `
`; var settingspanel = $(settingshtml)[0]; $(settingspanel) .on("click", BDFDB.dotCN.switchinner, () => {this.updateSettings(settingspanel);}) .on("click", ".reset-button", () => {this.resetAll();}) .on("click", ".removecustom-button", () => {this.removeAllIcons()}); return settingspanel; } onSettingsClosed () { if (this.updateFolders) { document.querySelectorAll(".folder").forEach(folderDiv => {this.updateFolderNotifications(folderDiv);}); this.updateFolders = false; } } setLabelsByLanguage () { switch (BDFDB.getDiscordLanguage().id) { case "hr": //croatian return { toast_addserver_text: "${servername} je dodan u mapu${foldername}.", toast_removeserver_text: "${servername} je uklonjena iz mape${foldername}.", servercontext_serverfolders_text: "Poslužitelj mapu", serversubmenu_createfolder_text: "Izradi mapu", serversubmenu_removefromfolder_text: "Ukloni poslužitelj iz mape", foldercontext_unreadfolder_text: "Označi sve kao pročitano", foldercontext_autounreadfolder_text: "Auto: Označite kao pročitano", foldercontext_foldersettings_text: "Postavke map", foldercontext_removefolder_text: "Izbriši mapu", modal_header_text: "Postavke mapa", modal_foldername_text: "Naziv mape", modal_tabheader1_text: "Mape", modal_tabheader2_text: "Boja mape", modal_tabheader3_text: "Boja tooltip", modal_tabheader4_text: "Prilagođeni ikona", modal_iconpicker_text: "Odabir mape", modal_colorpicker1_text: "Boja primarne mape", modal_colorpicker2_text: "Boja sekundarne mape", modal_colorpicker3_text: "Boja tooltip", modal_colorpicker4_text: "Boja fonta", modal_customopen_text: "Otvori ikona", modal_customclosed_text: "Zatvorena ikona", modal_custompreview_text: "Pregled ikona", btn_cancel_text: "Prekid", btn_save_text: "Uštedjeti" }; case "da": //danish return { toast_addserver_text: "${servername} er blevet tilføjet til mappe${foldername}.", toast_removeserver_text: "${servername} er blevet fjernet fra mappen${foldername}.", servercontext_serverfolders_text: "Servermapper", serversubmenu_createfolder_text: "Opret mappe", serversubmenu_removefromfolder_text: "Fjern server fra mappe", foldercontext_unreadfolder_text: "Markér alle som læst", foldercontext_autounreadfolder_text: "Auto: Markér som læst", foldercontext_foldersettings_text: "Mappeindstillinger", foldercontext_removefolder_text: "Slet mappe", modal_header_text: "Mappindstillinger", modal_foldername_text: "Mappenavn", modal_tabheader1_text: "Mappe", modal_tabheader2_text: "Mappefarve", modal_tabheader3_text: "Tooltipfarve", modal_tabheader4_text: "Brugerdefinerede ikoner", modal_iconpicker_text: "Mappevalg", modal_colorpicker1_text: "Primær mappefarve", modal_colorpicker2_text: "Sekundær mappefarve", modal_colorpicker3_text: "Tooltipfarve", modal_colorpicker4_text: "Skriftfarve", modal_customopen_text: "Åbn ikon", modal_customclosed_text: "Lukket ikon", modal_custompreview_text: "Ikon forhåndsvisning", btn_cancel_text: "Afbryde", btn_save_text: "Spare" }; case "de": //german return { toast_addserver_text: "${servername} wurde dem Ordner${foldername} hinzugefügt.", toast_removeserver_text: "${servername} wurde aus dem Ordner${foldername} entfernt.", servercontext_serverfolders_text: "Serverordner", serversubmenu_createfolder_text: "Ordner erzeugen", serversubmenu_removefromfolder_text: "Server aus Ordner entfernen", foldercontext_unreadfolder_text: "Alle als gelesen markieren", foldercontext_autounreadfolder_text: "Auto: Als gelesen markieren", foldercontext_foldersettings_text: "Ordnereinstellungen", foldercontext_removefolder_text: "Ordner löschen", modal_header_text: "Ordnereinstellungen", modal_foldername_text: "Ordnername", modal_tabheader1_text: "Ordner", modal_tabheader2_text: "Ordnerfarbe", modal_tabheader3_text: "Tooltipfarbe", modal_tabheader4_text: "Eigene Icons", modal_iconpicker_text: "Ordnerauswahl", modal_colorpicker1_text: "Primäre Ordnerfarbe", modal_colorpicker2_text: "Sekundäre Ordnerfarbe", modal_colorpicker3_text: "Tooltipfarbe", modal_colorpicker4_text: "Schriftfarbe", modal_customopen_text: "Geöffnetes Icon", modal_customclosed_text: "Geschlossenes Icon", modal_custompreview_text: "Iconvorschau", btn_cancel_text: "Abbrechen", btn_save_text: "Speichern" }; case "es": //spanish return { toast_addserver_text: "${servername} ha sido agregado a la carpeta${foldername}.", toast_removeserver_text: "${servername} ha sido eliminado de la carpeta${foldername}.", servercontext_serverfolders_text: "Carpetas de servidor", serversubmenu_createfolder_text: "Crear carpeta", serversubmenu_removefromfolder_text: "Eliminar servidor de la carpeta", foldercontext_unreadfolder_text: "Marcar todo como leido", foldercontext_autounreadfolder_text: "Auto: Marcar como leído", foldercontext_foldersettings_text: "Ajustes de carpeta", foldercontext_removefolder_text: "Eliminar carpeta", modal_header_text: "Ajustes de carpeta", modal_foldername_text: "Nombre de la carpeta", modal_tabheader1_text: "Carpeta", modal_tabheader2_text: "Color de carpeta", modal_tabheader3_text: "Color de tooltip", modal_tabheader4_text: "Iconos personalizados", modal_iconpicker_text: "Selección de carpeta", modal_colorpicker1_text: "Color primaria de carpeta", modal_colorpicker2_text: "Color secundario de la carpeta", modal_colorpicker3_text: "Color de tooltip", modal_colorpicker4_text: "Color de fuente", modal_customopen_text: "Ícono abierto", modal_customclosed_text: "Icono cerrado", modal_custompreview_text: "Vista previa del icono", btn_cancel_text: "Cancelar", btn_save_text: "Guardar" }; case "fr": //french return { toast_addserver_text: "${servername} a été ajouté au dossier${foldername}.", toast_removeserver_text: "${servername} a été supprimé du dossier${foldername}.", servercontext_serverfolders_text: "Dossiers du serveur", serversubmenu_createfolder_text: "Créer le dossier", serversubmenu_removefromfolder_text: "Supprimer le serveur du dossier", foldercontext_unreadfolder_text: "Tout marquer comme lu", foldercontext_autounreadfolder_text: "Auto: Marquer comme lu", foldercontext_foldersettings_text: "Paramètres du dossier", foldercontext_removefolder_text: "Supprimer le dossier", modal_header_text: "Paramètres du dossier", modal_foldername_text: "Nom de dossier", modal_tabheader1_text: "Dossier", modal_tabheader2_text: "Couleur du dossier", modal_tabheader3_text: "Couleur de tooltip", modal_tabheader4_text: "Icônes personnalisées", modal_iconpicker_text: "Choix du dossier", modal_colorpicker1_text: "Couleur primaire du dossier", modal_colorpicker2_text: "Couleur secondaire du dossier", modal_colorpicker3_text: "Couleur de tooltip", modal_colorpicker4_text: "Couleur de la police", modal_customopen_text: "Icône ouverte", modal_customclosed_text: "Icône fermée", modal_custompreview_text: "Aperçu de l'icône", btn_cancel_text: "Abandonner", btn_save_text: "Enregistrer" }; case "it": //italian return { toast_addserver_text: "${servername} è stato aggiunto alla cartella${foldername}.", toast_removeserver_text: "${servername} è stato rimosso dalla cartella${foldername}.", servercontext_serverfolders_text: "Cartelle del server", serversubmenu_createfolder_text: "Creare una cartella", serversubmenu_removefromfolder_text: "Rimuovere il server dalla cartella", foldercontext_unreadfolder_text: "Segna tutti come letti", foldercontext_autounreadfolder_text: "Auto: Contrassegna come letto", foldercontext_foldersettings_text: "Impostazioni cartella", foldercontext_removefolder_text: "Elimina cartella", modal_header_text: "Impostazioni cartella", modal_foldername_text: "Nome della cartella", modal_tabheader1_text: "Cartella", modal_tabheader2_text: "Colore della cartella", modal_tabheader3_text: "Colore della tooltip", modal_tabheader4_text: "Icone personalizzate", modal_iconpicker_text: "Selezione della cartella", modal_colorpicker1_text: "Colore primaria della cartella", modal_colorpicker2_text: "Colore secondaria della cartella", modal_colorpicker3_text: "Colore della tooltip", modal_colorpicker4_text: "Colore del carattere", modal_customopen_text: "Icona aperta", modal_customclosed_text: "Icona chiusa", modal_custompreview_text: "Icona anteprima", btn_cancel_text: "Cancellare", btn_save_text: "Salvare" }; case "nl": //dutch return { toast_addserver_text: "${servername} is toegevoegd aan de map${foldername}.", toast_removeserver_text: "${servername} is verwijderd uit de map${foldername}.", servercontext_serverfolders_text: "Servermappen", serversubmenu_createfolder_text: "Map aanmaken", serversubmenu_removefromfolder_text: "Server uit map verwijderen", foldercontext_unreadfolder_text: "Alles als gelezen markeren", foldercontext_autounreadfolder_text: "Auto: Markeren als gelezen", foldercontext_foldersettings_text: "Mapinstellingen", foldercontext_removefolder_text: "Verwijder map", modal_header_text: "Mapinstellingen", modal_foldername_text: "Mapnaam", modal_tabheader1_text: "Map", modal_tabheader2_text: "Mapkleur", modal_tabheader3_text: "Tooltipkleur", modal_tabheader4_text: "Aangepaste keuze", modal_iconpicker_text: "Map keuze", modal_colorpicker1_text: "Primaire mapkleur", modal_colorpicker2_text: "Tweede mapkleur", modal_colorpicker3_text: "Tooltipkleur", modal_colorpicker4_text: "Doopvontkleur", modal_customopen_text: "Geopende keuze", modal_customclosed_text: "Gesloten keuze", modal_custompreview_text: "Voorbeeld van keuze", btn_cancel_text: "Afbreken", btn_save_text: "Opslaan" }; case "no": //norwegian return { toast_addserver_text: "${servername} er lagt til i mappe${foldername}.", toast_removeserver_text: "${servername} er fjernet fra mappen${foldername}.", servercontext_serverfolders_text: "Servermapper", serversubmenu_createfolder_text: "Lag mappe", serversubmenu_removefromfolder_text: "Fjern server fra mappe", foldercontext_unreadfolder_text: "Marker alle som lest", foldercontext_autounreadfolder_text: "Auto: Merk som les", foldercontext_foldersettings_text: "Mappinnstillinger", foldercontext_removefolder_text: "Slett mappe", modal_header_text: "Mappinnstillinger", modal_foldername_text: "Mappenavn", modal_tabheader1_text: "Mappe", modal_tabheader2_text: "Mappefarge", modal_tabheader3_text: "Tooltipfarge", modal_tabheader4_text: "Tilpassede ikoner", modal_iconpicker_text: "Mappevalg", modal_colorpicker1_text: "Primær mappefarge", modal_colorpicker2_text: "Sekundær mappefarge", modal_colorpicker3_text: "Tooltipfarge", modal_colorpicker4_text: "Skriftfarge", modal_customopen_text: "Åpnet ikon", modal_customclosed_text: "Lukket ikon", modal_custompreview_text: "Ikon forhåndsvisning", btn_cancel_text: "Avbryte", btn_save_text: "Lagre" }; case "pl": //polish return { toast_addserver_text: "${servername} został dodany do folderu${foldername}.", toast_removeserver_text: "${servername} został usunięty z folderu${foldername}.", servercontext_serverfolders_text: "Foldery serwera", serversubmenu_createfolder_text: "Utwórz folder", serversubmenu_removefromfolder_text: "Usuń serwer z folderu", foldercontext_unreadfolder_text: "Oznacz wszystkie jako przeczytane", foldercontext_autounreadfolder_text: "Auto: Oznacz jako przeczytane", foldercontext_foldersettings_text: "Ustawienia folderu", foldercontext_removefolder_text: "Usuń folder", modal_header_text: "Ustawienia folderu", modal_foldername_text: "Nazwa folderu", modal_tabheader1_text: "Folder", modal_tabheader2_text: "Kolor folderu", modal_tabheader3_text: "Kolor podpowiedzi", modal_tabheader4_text: "Niestandardowe ikony", modal_iconpicker_text: "Wybór folderu", modal_colorpicker1_text: "Podstawowy kolor folderu", modal_colorpicker2_text: "Drugorzędny kolor folderu", modal_colorpicker3_text: "Kolor podpowiedzi", modal_colorpicker4_text: "Kolor czcionki", modal_customopen_text: "Otwarta ikona", modal_customclosed_text: "Zamknięta ikona", modal_custompreview_text: "Podgląd ikony", btn_cancel_text: "Anuluj", btn_save_text: "Zapisz" }; case "pt-BR": //portuguese (brazil) return { toast_addserver_text: "${servername} foi adicionado à pasta${foldername}.", toast_removeserver_text: "${servername} foi removido da pasta${foldername}.", servercontext_serverfolders_text: "Pastas de servidores", serversubmenu_createfolder_text: "Criar pasta", serversubmenu_removefromfolder_text: "Remover servidor da pasta", foldercontext_unreadfolder_text: "Marcar tudo como lido", foldercontext_autounreadfolder_text: "Auto: Marcar como lido", foldercontext_foldersettings_text: "Configurações da pasta", foldercontext_removefolder_text: "Excluir pasta", modal_header_text: "Configurações da pasta", modal_foldername_text: "Nome da pasta", modal_tabheader1_text: "Pasta", modal_tabheader2_text: "Cor da pasta", modal_tabheader3_text: "Cor da tooltip", modal_tabheader4_text: "Ícones personalizados", modal_iconpicker_text: "Escolha da pasta", modal_colorpicker1_text: "Cor primária da pasta", modal_colorpicker2_text: "Cor secundária da pasta", modal_colorpicker3_text: "Cor da tooltip", modal_colorpicker4_text: "Cor da fonte", modal_customopen_text: "Ícone aberto", modal_customclosed_text: "Ícone fechado", modal_custompreview_text: "Pré-visualização de ícones", btn_cancel_text: "Cancelar", btn_save_text: "Salvar" }; case "fi": //finnish return { toast_addserver_text: "${servername} on lisätty kansioon${foldername}.", toast_removeserver_text: "${servername} on poistettu kansioon${foldername}.", servercontext_serverfolders_text: "Palvelinkansiot", serversubmenu_createfolder_text: "Luo kansio", serversubmenu_removefromfolder_text: "Poista palvelin kansioista", foldercontext_unreadfolder_text: "Merkitse kaikki luetuksi", foldercontext_autounreadfolder_text: "Auto: merkitse luettavaksi", foldercontext_foldersettings_text: "Kansion kansio", foldercontext_removefolder_text: "Poista kansio", modal_header_text: "Kansion kansio", modal_foldername_text: "Kansion nimi", modal_tabheader1_text: "Kansio", modal_tabheader2_text: "Kansionväri", modal_tabheader3_text: "Tooltipväri", modal_tabheader4_text: "Mukautetut kuvakkeet", modal_iconpicker_text: "Kansion valinta", modal_colorpicker1_text: "Ensisijainen kansionväri", modal_colorpicker2_text: "Toissijainen kansionväri", modal_colorpicker3_text: "Tooltipväri", modal_colorpicker4_text: "Fontinväri", modal_customopen_text: "Avattu kuvake", modal_customclosed_text: "Suljettu kuvake", modal_custompreview_text: "Kuvakkeen esikatselu", btn_cancel_text: "Peruuttaa", btn_save_text: "Tallentaa" }; case "sv": //swedish return { toast_addserver_text: "${servername} har lagts till i mapp${foldername}.", toast_removeserver_text: "${servername} har tagits bort från mappen${foldername}.", servercontext_serverfolders_text: "Servermappar", serversubmenu_createfolder_text: "Skapa mapp", serversubmenu_removefromfolder_text: "Ta bort servern från mappen", foldercontext_unreadfolder_text: "Markera allt som läst", foldercontext_autounreadfolder_text: "Auto: Markera som Läs", foldercontext_foldersettings_text: "Mappinställningar", foldercontext_removefolder_text: "Ta bort mapp", modal_header_text: "Mappinställningar", modal_foldername_text: "Mappnamn", modal_tabheader1_text: "Mapp", modal_tabheader2_text: "Mappfärg", modal_tabheader3_text: "Tooltipfärg", modal_tabheader4_text: "Anpassade ikoner", modal_iconpicker_text: "Mappval", modal_colorpicker1_text: "Primär mappfärg", modal_colorpicker2_text: "Sekundär mappfärg", modal_colorpicker3_text: "Tooltipfärg", modal_colorpicker4_text: "Fontfärg", modal_customopen_text: "Öppnad ikon", modal_customclosed_text: "Closed Icon", modal_custompreview_text: "Ikon förhandsvisning", btn_cancel_text: "Avbryta", btn_save_text: "Spara" }; case "tr": //turkish return { toast_addserver_text: "${servername} klasörü${foldername} eklendi.", toast_removeserver_text: "${servername} klasörü${foldername} kaldırıldı", servercontext_serverfolders_text: "Sunucu klasörleri", serversubmenu_createfolder_text: "Klasör oluşturun", serversubmenu_removefromfolder_text: "Sunucuyu klasörden kaldır", foldercontext_unreadfolder_text: "Tümünü Oku olarak işaretle", foldercontext_autounreadfolder_text: "Oto: Okundu Olarak İşaretle", foldercontext_foldersettings_text: "Klasör Ayarları", foldercontext_removefolder_text: "Klasörü sil", modal_header_text: "Klasör Ayarları", modal_foldername_text: "Klasör adı", modal_tabheader1_text: "Klasör", modal_tabheader2_text: "Klasör rengi", modal_tabheader3_text: "Tooltip rengi", modal_tabheader4_text: "Özel simgeler", modal_iconpicker_text: "Klasör seçimi", modal_colorpicker1_text: "Birincil klasör rengi", modal_colorpicker2_text: "İkincil klasör rengi", modal_colorpicker3_text: "Tooltip rengi", modal_colorpicker4_text: "Yazı rengi", modal_customopen_text: "Açılmış simge", modal_customclosed_text: "Kapalı simge", modal_custompreview_text: "Simge önizleme", btn_cancel_text: "Iptal", btn_save_text: "Kayıt" }; case "cs": //czech return { toast_addserver_text: "${servername} byl přidán do složky${foldername}.", toast_removeserver_text: "${servername} byl odstraněn ze složky${foldername}.", servercontext_serverfolders_text: "Složky serveru", serversubmenu_createfolder_text: "Vytvořit složky", serversubmenu_removefromfolder_text: "Odstranit server ze složky", foldercontext_unreadfolder_text: "Označit vše jako přečtené", foldercontext_autounreadfolder_text: "Auto: Označit jako přečtené", foldercontext_foldersettings_text: "Nastavení složky", foldercontext_removefolder_text: "Smazat složky", modal_header_text: "Nastavení složky", modal_foldername_text: "Název složky", modal_tabheader1_text: "Složky", modal_tabheader2_text: "Barva složky", modal_tabheader3_text: "Barva tooltip", modal_tabheader4_text: "Vlastní ikony", modal_iconpicker_text: "Volba složky", modal_colorpicker1_text: "Primární barva složky", modal_colorpicker2_text: "Sekundární barva složky", modal_colorpicker3_text: "Barva tooltip", modal_colorpicker4_text: "Barva fontu", modal_customopen_text: "Otevřená ikona", modal_customclosed_text: "Uzavřená ikona", modal_custompreview_text: "Náhled ikony", btn_cancel_text: "Zrušení", btn_save_text: "Uložit" }; case "bg": //bulgarian return { toast_addserver_text: "${servername} е добавен към папката${foldername}.", toast_removeserver_text: "${servername} е премахнат от папката${foldername}.", servercontext_serverfolders_text: "Сървърни папки", serversubmenu_createfolder_text: "Създай папка", serversubmenu_removefromfolder_text: "Премахване на сървър от папка", foldercontext_unreadfolder_text: "Маркирай всички като прочетени", foldercontext_autounreadfolder_text: "Авто: Маркиране като четене", foldercontext_foldersettings_text: "Настройки папка", foldercontext_removefolder_text: "Изтриване на папка", modal_header_text: "Настройки папка", modal_foldername_text: "Име на папка", modal_tabheader1_text: "Папка", modal_tabheader2_text: "Цвят на папка", modal_tabheader3_text: "Цвят на подсказка", modal_tabheader4_text: "Персонализирани икони", modal_iconpicker_text: "Избор на папки", modal_colorpicker1_text: "Цвят основнен на папка", modal_colorpicker2_text: "цвят вторичен на папка", modal_colorpicker3_text: "Цвят на подсказка", modal_colorpicker4_text: "Цвят на шрифта", modal_customopen_text: "Отворена икона", modal_customclosed_text: "Затворена икона", modal_custompreview_text: "Икона Преглед", btn_cancel_text: "Зъбести", btn_save_text: "Cпасяване" }; case "ru": //russian return { toast_addserver_text: "${servername} добавлен в папку${foldername}.", toast_removeserver_text: "${servername} был удален из папки${foldername}.", servercontext_serverfolders_text: "Папки сервера", serversubmenu_createfolder_text: "Создать папки", serversubmenu_removefromfolder_text: "Удаление сервера из папки", foldercontext_unreadfolder_text: "Отметить все как прочитанное", foldercontext_autounreadfolder_text: "Авто: Отметить как прочитанное", foldercontext_foldersettings_text: "Настройки папки", foldercontext_removefolder_text: "Удалить папки", modal_header_text: "Настройки папки", modal_foldername_text: "Имя папки", modal_tabheader1_text: "Папка", modal_tabheader2_text: "Цвет папки", modal_tabheader3_text: "Цвет подсказка", modal_tabheader4_text: "Пользовательские значки", modal_iconpicker_text: "Выбор папки", modal_colorpicker1_text: "Цвет основной папки", modal_colorpicker2_text: "Цвет вторичной папки", modal_colorpicker3_text: "Цвет подсказка", modal_colorpicker4_text: "Цвет шрифта", modal_customopen_text: "Открытая иконка", modal_customclosed_text: "Закрытая иконка", modal_custompreview_text: "Иконка Просмотр", btn_cancel_text: "Отмена", btn_save_text: "Cпасти" }; case "uk": //ukrainian return { toast_addserver_text: "${servername} було додано до папки${foldername}.", toast_removeserver_text: "${servername} був вилучений з папки${foldername}.", servercontext_serverfolders_text: "Папки сервера", serversubmenu_createfolder_text: "Створити папки", serversubmenu_removefromfolder_text: "Видалити сервер із папки", foldercontext_unreadfolder_text: "Позначити як прочитане", foldercontext_autounreadfolder_text: "Авто: Позначити як прочитане", foldercontext_foldersettings_text: "Параметри папки", foldercontext_removefolder_text: "Видалити папки", modal_header_text: "Параметри папки", modal_foldername_text: "Ім'я папки", modal_tabheader1_text: "Папки", modal_tabheader2_text: "Колір папки", modal_tabheader3_text: "Колір підказка", modal_tabheader4_text: "Користувальницькі іконки", modal_iconpicker_text: "Вибір папки", modal_colorpicker1_text: "Колір основної папки", modal_colorpicker2_text: "Колір вторинного папки", modal_colorpicker3_text: "Колір підказка", modal_colorpicker4_text: "Колір шрифту", modal_customopen_text: "Відкрита ікона", modal_customclosed_text: "Закрита ікона", modal_custompreview_text: "Піктограма попереднього перегляду", btn_cancel_text: "Скасувати", btn_save_text: "Зберегти" }; case "ja": //japanese return { toast_addserver_text: "${servername} がフォルダ${foldername} に追加されました。", toast_removeserver_text: "${servername} がフォルダ${foldername} から削除されました。", servercontext_serverfolders_text: "サーバーフォルダ", serversubmenu_createfolder_text: "フォルダーを作る", serversubmenu_removefromfolder_text: "フォルダからサーバーを削除する", foldercontext_unreadfolder_text: "すべてを読むようにマークする", foldercontext_autounreadfolder_text: "自動: 読み取りとしてマークする", foldercontext_foldersettings_text: "フォルダ設定", foldercontext_removefolder_text: "フォルダを削除する", modal_header_text: "フォルダ設定", modal_foldername_text: "フォルダ名", modal_tabheader1_text: "フォルダ", modal_tabheader2_text: "フォルダの色", modal_tabheader3_text: "ツールチップの色", modal_tabheader4_text: "カスタムアイコン", modal_iconpicker_text: "フォルダの選択", modal_colorpicker1_text: "プライマリフォルダの色", modal_colorpicker2_text: "セカンダリフォルダの色", modal_colorpicker3_text: "ツールチップの色", modal_colorpicker4_text: "フォントの色", modal_customopen_text: "開いたアイコン", modal_customclosed_text: "クローズドアイコン", modal_custompreview_text: "アイコンのプレビュー", btn_cancel_text: "キャンセル", btn_save_text: "セーブ" }; case "zh-TW": //chinese (traditional) return { toast_addserver_text: "${servername} 已被添加到文件夾${foldername}.", toast_removeserver_text: "${servername} 已從文件夾${foldername} 中刪除.", servercontext_serverfolders_text: "服務器文件夾", serversubmenu_createfolder_text: "創建文件夾", serversubmenu_removefromfolder_text: "從服務器中刪除服務器", foldercontext_unreadfolder_text: "標記為已讀", foldercontext_autounreadfolder_text: "自動: 標記為已讀", foldercontext_foldersettings_text: "文件夾設置", foldercontext_removefolder_text: "刪除文件夾", modal_header_text: "文件夾設置", modal_foldername_text: "文件夾名稱", modal_tabheader1_text: "夾", modal_tabheader2_text: "文件夾顏色", modal_tabheader3_text: "工具提示顏色", modal_tabheader4_text: "自定義圖標", modal_iconpicker_text: "文件夾選擇", modal_colorpicker1_text: "主文件夾顏色", modal_colorpicker2_text: "輔助文件夾顏色", modal_colorpicker3_text: "工具提示顏色", modal_colorpicker4_text: "字體顏色", modal_customopen_text: "打開的圖標", modal_customclosed_text: "封閉的圖標", modal_custompreview_text: "圖標預覽", btn_cancel_text: "取消", btn_save_text: "保存" }; case "ko": //korean return { toast_addserver_text: "${servername} 가 폴더${foldername} 에 추가되었습니다.", toast_removeserver_text: "${servername} 가 폴더${foldername} 에서 제거되었습니다.", servercontext_serverfolders_text: "서버 폴더", serversubmenu_createfolder_text: "폴더 만들기", serversubmenu_removefromfolder_text: "폴더에서 서버 제거", foldercontext_unreadfolder_text: "모두 읽은 상태로 표시", foldercontext_autounreadfolder_text: "자동: 읽은 상태로 표시", foldercontext_foldersettings_text: "폴더 설정", foldercontext_removefolder_text: "폴더 삭제", modal_header_text: "폴더 설정", modal_foldername_text: "폴더 이름", modal_tabheader1_text: "폴더", modal_tabheader2_text: "폴더 색", modal_tabheader3_text: "툴팁 색깔", modal_tabheader4_text: "사용자 정의 아이콘", modal_iconpicker_text: "폴더 선택", modal_colorpicker1_text: "기본 폴더 색", modal_colorpicker2_text: "보조 폴더 색", modal_colorpicker3_text: "툴팁 색깔", modal_colorpicker4_text: "글꼴 색깔", modal_customopen_text: "열린 아이콘", modal_customclosed_text: "닫힌 아이콘", modal_custompreview_text: "아이콘 미리보기", btn_cancel_text: "취소", btn_save_text: "저장" }; default: //default: english return { toast_addserver_text: "${servername} has been added to the folder${foldername}.", toast_removeserver_text: "${servername} has been removed from the folder${foldername}.", servercontext_serverfolders_text: "Serverfolders", serversubmenu_createfolder_text: "Create Folder", serversubmenu_removefromfolder_text: "Remove Server From Folder", foldercontext_unreadfolder_text: "Mark All As Read", foldercontext_autounreadfolder_text: "Auto: Mark As Read", foldercontext_foldersettings_text: "Foldersettings", foldercontext_removefolder_text: "Delete Folder", modal_header_text: "Foldersettings", modal_foldername_text: "Foldername", modal_tabheader1_text: "Folder", modal_tabheader2_text: "Foldercolor", modal_tabheader3_text: "Tooltipcolor", modal_tabheader4_text: "Custom Icons", modal_iconpicker_text: "Folderchoice", modal_colorpicker1_text: "Primary Foldercolor", modal_colorpicker2_text: "Secondary Foldercolor", modal_colorpicker3_text: "Tooltipcolor", modal_colorpicker4_text: "Fontcolor", modal_customopen_text: "Open Icon", modal_customclosed_text: "Closed Icon", modal_custompreview_text: "Iconpreview", btn_cancel_text: "Cancel", btn_save_text: "Save" }; } } } };