Skip to content

Commit 2fff6ba

Browse files
committed
Rename autoAppend option of styles.update() to append, condensed comments
1 parent f8e9561 commit 2fff6ba

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

block-quora-poe/block-quora-poe.user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// @description:zh-TW 阻止 AI + Quora 的推廣/贊助答案
1414
// @author Adam Lui
1515
// @namespace https://github.com/adamlui
16-
// @version 2026.1.28
16+
// @version 2026.5.19
1717
// @license MIT
1818
// @icon https://cdn.jsdelivr.net/gh/adamlui/userscripts@f3e6bf0/assets/images/icons/sites/quora/icon64.png
1919
// @match *://*.quora.com/*
@@ -721,7 +721,7 @@
721721
return alert
722722
},
723723

724-
init(modal) { // requires lib/dom.js
724+
init(modal) { // requires dom.js
725725
if (!this.styles) this.stylize() // to init/append stylesheet
726726
modal.classList.add(this.class) ; modal.parentNode.classList.add(`${this.class}-bg`)
727727
dom.addRisingParticles(modal)
@@ -754,7 +754,7 @@
754754

755755
safeWinOpen(url) { open(url, '_blank', 'noopener') }, // to prevent backdoor vulnerabilities
756756

757-
stylize() { // requires lib/dom.js + env
757+
stylize() { // requires dom.js + env
758758
const { browser: { isMobile }, ui: { scheme }} = env
759759
if (!this.styles) document.head.append(this.styles = dom.create.elem('style'))
760760
this.styles.textContent = (
@@ -799,10 +799,10 @@
799799

800800
window.styles = {
801801

802-
update({ key, autoAppend }) { // requires lib/dom.js
802+
update({ key, append }) { // requires dom.js
803803
if (!key) return console.error('Option \'key\' required by styles.update()')
804804
const style = this[key] ; style.node ||= dom.create.style()
805-
if (( autoAppend ?? style.autoAppend ) && !style.node.isConnected) document.head.append(style.node)
805+
if (( append ?? style.autoAppend ) && !style.node.isConnected) document.head.append(style.node)
806806
style.node.textContent = style.css
807807
},
808808

0 commit comments

Comments
 (0)