Skip to content

th-live: neutralise console-ban.js via uBlock Origin scriptlets; override screen/outer dimensions to match DevTools Device Toolbar#2

Draft
Copilot wants to merge 33 commits into
mainfrom
copilot/investigate-valid-phone-number
Draft

th-live: neutralise console-ban.js via uBlock Origin scriptlets; override screen/outer dimensions to match DevTools Device Toolbar#2
Copilot wants to merge 33 commits into
mainfrom
copilot/investigate-valid-phone-number

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

Two independent fixes for QTM Live platform sites (th-live.online, qqlive.online).

th-live-desktop-width.user.js → v0.14

Chrome DevTools Device Toolbar also overrides screen.width/height, screen.availWidth/availHeight, outerWidth, and outerHeight. The userscript skipped all six, so code paths reading those properties (some flexible.js variants, certain Vant internals) still saw real desktop dimensions despite all other overrides being in place.

Changes:

  • Capture realAvailWidth, realAvailHeight, realOuterWidth, realOuterHeight before any override
  • New §1c: override all six properties in phoneMode at document-start
  • applyMode() phone branch: re-establish all six on toggle back
  • applyMode() full-width branch: delete all six to restore native values
  • availWidth/availHeight fall back to their own captured values (not screen.width/height) — correct on systems with a taskbar/dock
// New captures (before any override)
var realAvailWidth  = window.screen.availWidth;
var realAvailHeight = window.screen.availHeight;
var realOuterWidth  = window.outerWidth;
var realOuterHeight = window.outerHeight;

// §1c overrides
Object.defineProperty(window.screen, 'width',       { get: () => phoneMode ? PHONE_WIDTH  : realViewportWidth,  configurable: true });
Object.defineProperty(window.screen, 'availWidth',  { get: () => phoneMode ? PHONE_WIDTH  : realAvailWidth,     configurable: true });
Object.defineProperty(window.screen, 'height',      { get: () => phoneMode ? PHONE_HEIGHT : realViewportHeight, configurable: true });
Object.defineProperty(window.screen, 'availHeight', { get: () => phoneMode ? PHONE_HEIGHT : realAvailHeight,    configurable: true });
Object.defineProperty(window, 'outerWidth',         { get: () => phoneMode ? PHONE_WIDTH  : realOuterWidth,     configurable: true });
Object.defineProperty(window, 'outerHeight',        { get: () => phoneMode ? PHONE_HEIGHT : realOuterHeight,    configurable: true });

th-live-console-ban.txt (new)

Documents how console-ban.js is bundled into the app and how to neutralise its three effects (clear, debug, bfcache) with uBlock Origin scriptlets. Includes a ready-to-paste filter block and a Tampermonkey equivalent.

th-live.online##+js(set-constant, console.clear, noopFunc)   ! stops console wipe
th-live.online##+js(no-setInterval-if, debugger)             ! stops debugger pause loop
th-live.online##+js(remove-event-listener-if, pageshow)      ! stops bfcache reload
Original prompt

This section details on the original issue you should resolve

<issue_title>What does th-live.online consider a valid phone number when registering an account on it?</issue_title>
<issue_description>What does th-live.online consider a valid phone number when registering an account on it?</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title [WIP] Determine valid phone number format for registration Document th-live.online phone number validation requirements Mar 7, 2026
… Thai number

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title Document th-live.online phone number validation requirements Document th-live.online phone validation requirements and how to obtain a valid Thai number Mar 7, 2026
Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title Document th-live.online phone validation requirements and how to obtain a valid Thai number Document free Thai virtual-number services for th-live.online registration Mar 7, 2026
…wing models

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title Document free Thai virtual-number services for th-live.online registration docs: add guest browsing and free virtual-number notes for th-live.online Mar 7, 2026
…for login bypass

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title docs: add guest browsing and free virtual-number notes for th-live.online docs: th-live.online login wall analysis — guest browsing, userscript feasibility Mar 7, 2026
Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title docs: th-live.online login wall analysis — guest browsing, userscript feasibility docs: th-live.online US number SMS registration analysis + userscript login bypass deep-dive Mar 7, 2026
Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title docs: th-live.online US number SMS registration analysis + userscript login bypass deep-dive docs: correct false email-tab claim; add missing-email-tab analysis Mar 7, 2026
@Zero3K20
Copy link
Copy Markdown
Owner

Zero3K20 commented Mar 8, 2026

@copilot

This is what it looks like when I choose Full width:

image

This is what it looks like when I choose Phone width:

image

…0.8)

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 8, 2026

@copilot

This is what it looks like when I choose Full width:
...

Fixed in 6e50cc7 (v0.8).

Root cause: fixAllFixedEls() applies inline !important styles (left, right, width, max-width) directly to DOM elements. When switching to Full Width, applyMode() disabled the CSS stylesheet and removed the property overrides, but never removed those inline styles. On a 1440 px viewport, left: max(0px, calc(50vw - 195px)) evaluates to 525 px — so every fixed element (user avatars, gift icons, overlays) was anchored 525 px from the left instead of at the viewport edge, which scattered them outside the content column.

Fix: Each element touched by the scan is now tagged with data-qtm-fixed="1". When switching to Full Width, a new clearFixedElStyles() function queries all tagged elements, removes the four inline properties, and strips the tag — restoring each element's native positioning before the viewport meta is reset to width=device-width.

Copilot AI changed the title Fix desktop layout, fixed-element positioning, rem font-size, touch emulation, SPA navigation, and live-room control positioning for QTM Live sites (v0.7) Fix desktop layout, fixed-element positioning, rem font-size, touch emulation, SPA navigation, live-room control positioning, and Full Width mode cleanup for QTM Live sites (v0.8) Mar 8, 2026
… on mode toggle (v0.9)

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title Fix desktop layout, fixed-element positioning, rem font-size, touch emulation, SPA navigation, live-room control positioning, and Full Width mode cleanup for QTM Live sites (v0.8) v0.9: Fix app-download overlay blocking live-room UI and scattered elements in full-width mode Mar 8, 2026
…ve stream (v0.10)

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title v0.9: Fix app-download overlay blocking live-room UI and scattered elements in full-width mode v0.10: Fix center-anchored live-room popups stretched and mis-positioned in phone-width mode Mar 8, 2026
…ht:auto (v0.11)

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title v0.10: Fix center-anchored live-room popups stretched and mis-positioned in phone-width mode v0.11: Fix app-download popup rendering at desktop viewport height instead of phone height Mar 8, 2026
…popup height

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot AI changed the title v0.11: Fix app-download popup rendering at desktop viewport height instead of phone height Fix app-download popup rendering at full desktop height instead of phone height Mar 8, 2026
Copilot AI and others added 8 commits March 8, 2026 05:07
…tent stream blocking

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
…-only streams

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
…hone column width

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
…ript injection + postMessage bridge

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
….js loadtimeout (CODE:14)

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
… to fix manifestLoadTimeOut (CODE:14)

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
…t overrides to match Device Toolbar

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
…alise console-ban.js

Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

What does th-live.online consider a valid phone number when registering an account on it?

2 participants