Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 1.8 KB

File metadata and controls

96 lines (61 loc) · 1.8 KB

Runtime API

These APIs are designed to use inside League Client with Pengu Loader plugin runtime.

window.openDevTools(remote?)

Call this function to open the built-in Chrome DevTools window.

Example:

window.openDevTools()     // built-in DevTools
window.openDevTools(true) // remote DevTools

window.openPluginsFolder(subdir?)

Call this function to open the plugins folder in new File Explorer window.

If path is given, it will open the path with respect to the plugins folder.

Example:

window.openPluginsFolder()
window.openPluginsFolder("/plugin-demo/config")

window.reloadClient()

Call this function to reload the Client and ignore caching.

Example:

window.reloadClient()

window.restartClient()

Call this function to restart the Client (entire the UX processes).

Example:

window.restartClient()

window.getScriptPath()

Call this function get the current script path.

Example:

// https://plugins/your-plugin/index.js
window.getScriptPath()

window.__llver

This property returns the current version of Pengu Loader.

Example:

console.log(window.__llver) // 0.6.0
console.log(`You are using Pengu Loader v${window.__llver}`)

::: tip

Since v1.1.0, this property has been deprecated. Please use Pengu.version instead.

:::