Jump to content

User:Modestginger/vector-2022.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Modestginger (talk | contribs) at 20:09, 2 October 2022. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
(function() {

  function updateViewport() {
    const viewportMeta = document.querySelector('meta[name="viewport"]');
    if (viewportMeta) {
      console.log(viewportMeta.getAttribute('content'));
      viewportMeta.setAttribute('content','width=device-width,initial-scale=1.0,minimum-scale=1.0');
      document.documentElement.classList.add('fixedViewport');
      window.scrollBy(-1000, 0);
    }
  }
  
  updateViewport();

  window.wpDarkModeAutoToggle = true;
})();