mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: notices not working in many cases
This commit is contained in:
+3
-1
@@ -2121,7 +2121,8 @@ export async function loadHomePage() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const response = await GetPrefs.json()
|
const response = await GetPrefs.json()
|
||||||
const labelArray = response.payload[3].value.split(' ')
|
|
||||||
|
const labelArray = response.payload.filter((item: any) => item.name === 'notices.filters').map((item: any) => item.value)[0].split(' ')
|
||||||
|
|
||||||
const xhr2 = new XMLHttpRequest()
|
const xhr2 = new XMLHttpRequest()
|
||||||
xhr2.open(
|
xhr2.open(
|
||||||
@@ -2147,6 +2148,7 @@ export async function loadHomePage() {
|
|||||||
} else {
|
} else {
|
||||||
if (!NoticeContainer!.innerText) {
|
if (!NoticeContainer!.innerText) {
|
||||||
for (let i = 0; i < NoticesPayload.payload.length; i++) {
|
for (let i = 0; i < NoticesPayload.payload.length; i++) {
|
||||||
|
console.log(NoticesPayload.payload[i].title, labelArray.includes(JSON.stringify(NoticesPayload.payload[i].label)))
|
||||||
if (labelArray.includes(JSON.stringify(NoticesPayload.payload[i].label))) {
|
if (labelArray.includes(JSON.stringify(NoticesPayload.payload[i].label))) {
|
||||||
// Create a div, and place information from json response
|
// Create a div, and place information from json response
|
||||||
const NewNotice = document.createElement('div')
|
const NewNotice = document.createElement('div')
|
||||||
|
|||||||
Reference in New Issue
Block a user