fix iframe bug

This commit is contained in:
Gabe Yuan
2023-08-06 22:01:47 +08:00
parent d497afb152
commit ab36f428cd
2 changed files with 9 additions and 4 deletions

View File

@@ -62,6 +62,11 @@ class ActionElement extends HTMLElement {
return;
}
// iframe
if (window.self !== window.top) {
return;
}
// 插入按钮
const actionName = "kiss-action";
customElements.define(actionName, ActionElement);
@@ -97,7 +102,7 @@ class ActionElement extends HTMLElement {
translator.updateRule(args);
break;
default:
// console.log(`[entry] kissEvent action skip: ${action}`);
// console.log(`[entry] kissEvent action skip: ${action}`);
}
});
})();