Plugins: Add plugin settings
- Add support for plugin settings, they appear in the same menu as the plugins, indented from the left to emphasize which plugin the setting belongs to - Note that plugin settings can still be changed even when the plugins are stopped - Add tooltips to plugin menu to view the plugin descriptions, description_lang can also be used - Fix scolling not working on song select when returning from game settings - Let instance owners set default plugin files in config.py, to make them easier to maintain - plugins.add() can now add plugins using a url - Plugins can be hidden from the plugin menu using PluginLoader.hide, an option in plugins.add(), or in config.py - Make p2.disable() incremental so that multiple plugins can disable multiplayer independently - Server no longer crashes if certain optional config fields were not copied over from an updated example config - Fix not being able to unload plugins if one was imported with errors
This commit is contained in:
@@ -56,6 +56,10 @@ function browserSupport(){
|
||||
},
|
||||
"KeyboardEvent.key": function(){
|
||||
return "key" in KeyboardEvent.prototype
|
||||
},
|
||||
"Module import": function(){
|
||||
eval("import('data:text/javascript,')")
|
||||
return true
|
||||
}
|
||||
}
|
||||
failedTests = []
|
||||
@@ -107,10 +111,12 @@ function showUnsupported(strings){
|
||||
var warn = document.createElement("div")
|
||||
warn.id = "unsupportedWarn"
|
||||
warn.innerText = "!"
|
||||
warn.textContent = "!"
|
||||
div.appendChild(warn)
|
||||
var hide = document.createElement("div")
|
||||
hide.id = "unsupportedHide"
|
||||
hide.innerText = "x"
|
||||
hide.textContent = "x"
|
||||
div.appendChild(hide)
|
||||
|
||||
var span = document.createElement("span")
|
||||
@@ -119,6 +125,7 @@ function showUnsupported(strings){
|
||||
if(i !== 0){
|
||||
var link = document.createElement("a")
|
||||
link.innerText = strings.browserSupport.details
|
||||
link.textContent = strings.browserSupport.details
|
||||
span.appendChild(link)
|
||||
}
|
||||
span.appendChild(document.createTextNode(browserWarning[i]))
|
||||
@@ -133,6 +140,7 @@ function showUnsupported(strings){
|
||||
for(var i = 0; i < failedTests.length; i++){
|
||||
var li = document.createElement("li")
|
||||
li.innerText = failedTests[i]
|
||||
li.textContent = failedTests[i]
|
||||
ul.appendChild(li)
|
||||
}
|
||||
details.appendChild(ul)
|
||||
@@ -143,6 +151,7 @@ function showUnsupported(strings){
|
||||
var chrome = document.createElement("a")
|
||||
chrome.href = "https://www.google.com/chrome/"
|
||||
chrome.innerText = "Google Chrome"
|
||||
chrome.textContent = "Google Chrome"
|
||||
details.appendChild(chrome)
|
||||
}
|
||||
details.appendChild(document.createTextNode(supportedBrowser[i]))
|
||||
|
||||
Reference in New Issue
Block a user