FANDOM


This script is for PERSONAL use only!

You are free to install this script for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:Common.js or MediaWiki:Wikia.js), as it would violate Fandom's Terms of Use.
(See the customization policy)

MercuryPreview add a shortcut that can let you quick preview mobile version of the page you are reading — without reload the tab or open a new tab.

Installation

Text above can be found here (edit)

Todo List & Known issues

Here's a list of what I hope to do, but I haven't done it yet. Or I don't know how to do yet. If you have a better idea, you can edit the code directly without leaving a message for me. In that case, add yourself to author list :)

Simplified code

It looks messy now.

Clear up unnecessary elements in iframe

Leave only articles. Remove unnecessary elements in iframe - wikia header & footer ect.

  • When iframe loads finish, remove the load icon. But I've given up .load(). Because it's too slow to wait for all the pictures in iframe to load.
  • Remove unnecessary elements in a better way than triggering them every second. But I've given up .load(). Because it's too slow to wait for all the pictures in iframe to load.
  • Find a better way to clear up unnecessary elements in iframe. .load() needs to wait until all images are loaded. In some large pages this will be slow.

Skip loading

Some namespaces do not support mercury skins. How to not load MercuryPreview in these namespaces.

  • Some wikis have extra namespaces. But this script is currently only load in content namespace(ns0) and help namespace(ns12). How to let the user customization which namespace to load it?
  • Thanks to Laclale. He/She reminded me of reverse thinking - "Don't load where" instead of "load where"

Better way to get content

Load previews in a better way. For example using Mercury API but not iframe.

  •  ?
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+