mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-09 14:47:47 +02:00
Plugin lifecycle optimization
- Added term flow before plugin is killed - Updated example implementations - Added SIGINT to Zoraxy for shutdown sequence (Fixes #561 ?)
This commit is contained in:
@@ -4,13 +4,23 @@
|
||||
</iframe>
|
||||
</div>
|
||||
<script>
|
||||
function initPluginUIView(){
|
||||
function initPluginUIView(forceOverwritePluginID = undefined){
|
||||
if (typeof(forceOverwritePluginID) != "undefined"){
|
||||
let pluginID = forceOverwritePluginID;
|
||||
console.log("Launching plugin UI for plugin with ID:", pluginID);
|
||||
loadPluginContext(pluginID);
|
||||
return;
|
||||
}
|
||||
let pluginID = getPluginIDFromWindowHash();
|
||||
if (pluginID == ""){
|
||||
return;
|
||||
}
|
||||
console.log("Launching plugin UI for plugin with ID:", pluginID);
|
||||
loadPluginContext(pluginID);
|
||||
}
|
||||
|
||||
function loadPluginContext(pluginID){
|
||||
//Check if the iframe is currently visable
|
||||
let pluginContextURL = `/plugin.ui/${pluginID}/`;
|
||||
$("#pluginContextLoader").attr("src", pluginContextURL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user