mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⚡ Perf(fixit-decryptor): rename hook name ondecrypted to decrypted (#123)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* FixIt decryptor for encrypted pages
|
||||
* @param {Object} option
|
||||
* @param {Function} option.ondecrypted handler after decrypting
|
||||
* @param {Object} options
|
||||
* @param {Function} options.decrypted handler after decrypting
|
||||
* @author @Lruihao https://lruihao.cn
|
||||
* @since v0.2.15
|
||||
*/
|
||||
FixItDecryptor = function (option = {}) {
|
||||
FixItDecryptor = function (options = {}) {
|
||||
var _proto = FixItDecryptor.prototype;
|
||||
this.option = option || {};
|
||||
this.options = options || {};
|
||||
this.decryptedEventSet = new Set();
|
||||
|
||||
/**
|
||||
@@ -15,7 +15,7 @@ FixItDecryptor = function (option = {}) {
|
||||
*/
|
||||
_proto.init = () => {
|
||||
const _decryptor = this;
|
||||
this.option.ondecrypted && this.addEventListener('decrypted', this.option.ondecrypted);
|
||||
this.options.decrypted && this.addEventListener('decrypted', this.options.decrypted);
|
||||
|
||||
this.validateLocalStorage();
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -901,7 +901,7 @@ class FixIt {
|
||||
|
||||
initFixItDecryptor() {
|
||||
this.decryptor = new FixItDecryptor({
|
||||
ondecrypted: () => {
|
||||
decrypted: () => {
|
||||
this.initTwemoji();
|
||||
this.initDetails();
|
||||
this.initLightGallery();
|
||||
|
||||
Reference in New Issue
Block a user