Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
Jump to content

User talk:TheresNoTime

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 30 days ago by Matma Rex in topic User:TheresNoTime/stewResponseHelper.js

User:TheresNoTime/stewResponseHelper.js

[edit]

A bug in this script was reported here: T371735. To fix, please replace this function:

  // https://stackoverflow.com/a/26744533
  function getURLParams(k) {
    var p = {};
    location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (s, k, v) {
      p[k] = v;
    });
    return k ? p[k] : p;
  }

with:

  function getURLParams(k) {
    var url = new URL(location.href);
    return url.searchParams.get(k);
  }

Matma Rex (talk) 09:57, 6 August 2024 (UTC)Reply