ChromeExt

class · namespace z3n7 · source Browser/ChromeExt.cs

public class ChromeExt

Older variant of Extension: Chromium instances only, manager installed from CRX.

Constructors

ChromeExt

public ChromeExt(IZennoPosterProjectModel project, bool log = false)

source

Creates a helper without an instance; only GetVer works.

Parameter Description
log Not used.
public ChromeExt(IZennoPosterProjectModel project, Instance instance, bool log = false)

source

Creates a helper for an instance.

Parameter Description
log Not used.

Methods

GetVer

public string GetVer(string extId)

source

Reads an installed extension's version from {pathProfileFolder}\Default\Secure Preferences.

Parameter Description
extId Extension id.

Returns: The version. Throws when the file has no such extension or version.

Install

public bool Install(string extId, string fileName, bool log = false)

source

Installs a CRX file unless an extension with this id is already installed.

Parameter Description
extId Extension id.
fileName CRX file name in {project.Path}.crx\.
log Not used.

Returns: true when installed now. Throws when the file is missing.

Rm

public void Rm(string[] ExtToRemove)

source

Uninstalls the extensions; failures are ignored.

Parameter Description
ExtToRemove Extension ids.

Switch

public bool Switch(string toUse = "", bool log = false)

source

Enables the listed extensions and disables all others through the One-Click Extensions Manager page (installed first if missing). Mouse emulation is restored afterwards. Chromium instances only.

Parameter Description
toUse Names or ids of the extensions to keep enabled; matched as substrings of this text.
log Not used.

Returns: true when a listed extension was switched on.