User talk:Ais523/highlightmyname2.js
Update for JavaScript deprecation
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace "addOnloadHook
" with "jQuery
", to fix the deprecated code (per mw:ResourceLoader/JavaScript_Deprecations). Thanks :) –Quiddity (talk) 21:45, 13 July 2014 (UTC)
- Done Callanecc (talk • contribs • logs) 15:08, 14 July 2014 (UTC)
TypeError at special page
[edit]Hi! When I visit ca:Special:CXStats or fr:Special:CXStats with this script running via my m:User:Quiddity (WMF)/global.js, in Firefox I get a consistently blank page, and in Chrome I get a blank page the first time but a refresh fixes it. Webconsole is reporting "TypeError: document.getElementById(...) is null
" (Firefox) or "TypeError: Cannot read property 'firstChild' of null
" (Chrome) (screenshots: [1] and [2]).
I'm not sure if this is a script problem at this end, or a special-page problem at that end. (one error with that special-page appearing blank is in discussion at phab:T101934 but I'm not sure if it's the same thing). Hope that helps. Quiddity (WMF) (talk) 23:06, 11 June 2015 (UTC)
- The script assumes there is a bodyContent present in every page and tries to unconditionally access it, causing javascript error. Special:CX or Special:CXStats does not have any bodyContent. Can be solved by either add a null check around document.getElementById or simplifying the code using jQuery.--Santhosh.thottingal (talk) 05:05, 12 June 2015 (UTC)
Empty raw watchlist problem in Firefox
[edit]If I have this script enabled, when I visit Special:EditWatchlist/raw the textarea briefly shows the content, but then the content disappears.
No errors in webconsole. Reproduceable in Firefox (for many versions/years) but not Chromium. Quiddity (talk) 18:23, 31 August 2017 (UTC)