|
235 | 235 | // @description:zu Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-poe.com! |
236 | 236 | // @author Adam Lui |
237 | 237 | // @namespace https://github.com/adamlui |
238 | | -// @version 2025.9.17.1 |
| 238 | +// @version 2025.9.19 |
239 | 239 | // @license MIT |
240 | 240 | // @icon https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?v=844b16e |
241 | 241 | // @icon64 https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?v=844b16e |
|
250 | 250 | // @compatible qq |
251 | 251 | // @match *://chatgpt.com/* |
252 | 252 | // @match *://github.com/* |
| 253 | +// @match *://gitlab.com/* |
253 | 254 | // @match *://poe.com/* |
254 | 255 | // @connect cdn.jsdelivr.net |
255 | 256 | // @connect gm.chatgptwidescreen.com |
|
291 | 292 |
|
292 | 293 | (async () => { |
293 | 294 |
|
294 | | - // Hide Perplexity notice on GitHub if found |
295 | | - if (location.pathname.includes('chatgpt-widescreen')) { |
296 | | - const perplexityAlert = [...document.querySelectorAll('.markdown-alert')] |
297 | | - .find(alert => alert.textContent.includes('Perplexity')) |
298 | | - if (perplexityAlert) perplexityAlert.style.display = 'none' |
| 295 | + // Hide Perplexity notice on GH/GL if found |
| 296 | + if (location.hostname.includes('git')) { |
| 297 | + if (location.pathname.includes('chatgpt-widescreen')) { |
| 298 | + const alertObserver = new MutationObserver(() => { |
| 299 | + const alert = [...document.querySelectorAll('.markdown-alert')] |
| 300 | + .find(alert => alert.textContent.includes('Perplexity')) |
| 301 | + if (alert) { alert.style.display = 'none' ; alertObserver.disconnect() } |
| 302 | + }) |
| 303 | + alertObserver.observe(document.body, { childList: true, subtree: true }) |
| 304 | + setTimeout(() => alertObserver.disconnect(), 5000) // don't observer forever |
| 305 | + } |
| 306 | + return |
299 | 307 | } |
300 | 308 |
|
301 | 309 | // Init DATA |
|
0 commit comments