Perf(fixit-decryptor): rename hook name ondecrypted to decrypted (#123)

This commit is contained in:
Cell
2022-05-26 16:40:48 +08:00
parent b03ae3222e
commit d756349248
4 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -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();
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -901,7 +901,7 @@ class FixIt {
initFixItDecryptor() {
this.decryptor = new FixItDecryptor({
ondecrypted: () => {
decrypted: () => {
this.initTwemoji();
this.initDetails();
this.initLightGallery();