Skip to content

Axiom-Proxy/Axiom-Plugins-Directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Axiom API Documentation

The AxiomAPI class handles premium key validation, key storage, and user dialogs.

Methods

handleCallback(callback)

Handles the callback after a dialog interaction. Removes the dialog element from the DOM.

  • Parameters:
    • callback (function): The callback function to execute.

getKeyInfo(key)

Asynchronously checks if a given premium key is valid by making a POST request to /api/premium/check.

  • Parameters:
    • key (string): The premium key to validate.
  • Returns: Promise - true if the key is valid, false otherwise.

setKey(key)

Stores the premium key in localStorage.

  • Parameters:
    • key (string): The premium key to store.

dialog(message, positive, negative, callback)

Displays a modal dialog with a message and two buttons (positive and negative). Executes the callback with the button text when clicked.

  • Parameters:
    • message (string): The message to display in the dialog.
    • positive (string): Text for the positive button.
    • negative (string): Text for the negative button.
    • callback (function): Function to call with the clicked button's text as argument.

AxiomPluginManager

The AxiomPluginManager class manages plugin registration and browser settings.

Methods

register(plugin)

Registers a plugin if it meets the requirements (version not deprecated, has author and name).

  • Parameters:
    • plugin (object): The plugin object with properties version, author, name.

setProxy(proxy)

Sets the proxy type for the browser.

  • Parameters:
    • proxy (string): Must be one of "uv", "scramjet", or "oxygen".
  • Behavior: Stores the proxy in localStorage as 'axiomProxy'.

setHomepage(homepage, customUrl)

Sets the homepage type.

  • Parameters:
    • homepage (string): Must be "start", "games", or "custom".
    • customUrl (string, optional): The custom URL if homepage is "custom".
  • Behavior: Stores homepage in localStorage as 'axiomHomepage', and customUrl as 'axiomCustomHomepage' if applicable.

setTheme(theme)

Sets the theme.

  • Parameters:
    • theme (string): The theme value to set.
  • Behavior: Stores theme in localStorage as 'axiomTheme'.

resetAll()

Resets all settings to defaults after user confirmation via dialog. Clears localStorage and cookies, then reloads the page.

  • Parameters: None.

Global Objects

  • window.axiom: Instance of AxiomAPI.
  • window.axiomPluginAPI: Instance of AxiomPluginManager.

About

A list of plugins for Axiom

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors