MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / uninstall

Function uninstall

src/pages/plugin/plugin.js:242–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240 }
241
242 async function uninstall() {
243 try {
244 const pluginDir = Url.join(PLUGIN_DIR, plugin.id);
245 const state = await InstallState.new(plugin.id);
246 await Promise.all([
247 loadAd(this),
248 fsOperation(pluginDir).delete(),
249 state.delete(state.storeUrl),
250 ]);
251 acode.unmountPlugin(plugin.id);
252 if (onUninstall) onUninstall(plugin.id);
253 installed = false;
254 update = false;
255 if (!plugin.price) {
256 await helpers.showInterstitialIfReady();
257 }
258 render();
259 } catch (err) {
260 window.log("error", err);
261 helpers.error(err);
262 }
263 }
264
265 async function buy(e) {
266 const $button = e.target;

Callers 3

handlerFunction · 0.70
refundFunction · 0.70
index.jsFile · 0.50

Calls 9

fsOperationFunction · 0.85
onUninstallFunction · 0.85
newMethod · 0.80
unmountPluginMethod · 0.80
logMethod · 0.80
loadAdFunction · 0.70
renderFunction · 0.70
deleteMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected