InPageEdit-v2/en

From Wjghj Project Static Database
The colorful InPageEdit toolbox

InPageEdit is a MediaWiki plugin made by 机智的小鱼君 (DragonFish) in JavaScript which has good mobile optimization and useless colorful design. The main purpose is allowing users to use many MediaWiki functions without opening a new tab (including but not only "editing"), which speeds up the wiki maintaining process. The plugin is also modular designed, and providing many SDKs, which you can learn more about it here.

Features

InPageEdit Toolbox

  • There should be a InPageEdit Toolbox showing in the right corner of the article pages when you loaded it successfully.
  • All the features of the plugin can be found in the toolbox.

Quick Edit

Edit

  • Click the azure “edit Pencil button”in the toolbox to edit the page without opening a new tab
  • The editor provides previewing feature
  • You can also edit the old version to fix it quickly
  • Attention that you should not use it as a substitute of the original MediaWiki Edit page because the plugin does not have some ulities (such as template analysis and advanced editing toolbar etc) and the stability is less good. this plugin is better for minor edit fixing small errors.

Quick Edit for Sections

  • Create a Quick Edit button and allow you to Quick Edit this section

Quick Edit for Other Pages

Editing Navbox via the link in Navbar without opening a new page
  • The plugin will identify editing links in the articles which includes the "V·T·E" links in the Navbar and the "edit" links inside the templates, and add a Quick Edit button next to it which allows you to edit the page without opening a new page

Quick Redirect

IPE redirect.png
  • Click the orange "landing" icon in the IPE toolbox, you can redirect a page to the current one
  • Click the rose "take off" icon in the IPE toolbox, you can redirect the current page to another

Quick Rename

IPE rename.png
  • Click the orange "I" icon in the IPE toolbox, you can rename the current page without opening a new one

Quick Delete

  • Not ready yet, WIP

Quick Diff

IPE diff.png

  • When visiting RecentChanges or the history page, you can view the diff without opening a new page by clicking the original diff link

How to install

Personal Use (and your site allows personal JS)

Add the code down below at you personal JS page (User:YourUserName/common.js):

mw.loader.load('https://common.wjghj.cn/js/InPageEdit-v2');

Note: After saving, you have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold ⇧ Shift while clicking Reload, or press either Ctrl+F5 or Ctrl+R (⌘ Cmd+R on a Mac)
  • Google Chrome: Press Ctrl+⇧ Shift+R (⌘ Cmd+⇧ Shift+R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl+F5
  • Opera: Clear the cache in Tools → Preferences

Personal Use (via browser extension)

Some wiki sites disabled the personal JS, so using a browser extension

to import the plugin is necessary. Code Below is only a method. 
JavaScript
/**
 * Global JavaScript
 ** JS here will run on very page when it's ready,
 ** please check the usability of the code before saving.
 **/
console.info('%c[Global JavaScript] Loaded. ', 'font: large bold;');
/** Wait for jQuery **/
window.GlobalJS_wait_jQuery = setInterval(function() {
  if (typeof(jQuery) !== 'undefined') {
    if (typeof($) === 'undefined') $ = jQuery;
    console.info('[Global JavaScript] jQuery is ready. ');
    GlobalJS_loaded_jQuery();
    clearInterval(GlobalJS_wait_jQuery);
  } else {
    console.info('[Global JavaScript] jQuery is not ready yet……');
  }
}, 200);
/** When jQuery is ready **/
window.GlobalJS_loaded_jQuery = function() {
  /** MediaWiki InPageEdit-v2 Plugin **/
  (function() {
    if (typeof(mw) === 'undefined') return; // if is a MediaWiki site
    if (mw.config.get('wgVersion').split('.')[1] < 21) return; // check the MediaWiki version
    mw.loader.load('https://common.wjghj.cn/js/InPageEdit-v2'); // then, load IPE-v2
  }());
}

Reprint as a Gadget

  • WIP, Gadget will be posted on GitHub.

Customized Feature

InPageEdit is modular designed, you can use the almost all of the features which IPE provides freely.

See more: /SDK#Example

Try

Wanna try this plugin? InPageEdit is pre-configured to run on this page, so feel free to click every IPE-related buttons, and try it out! Don't worry about breaking anything, because this wiki does not allow anonymous editing.

Uninstall the Plugin

Auto Uninstall

Click the red "gear" icon in the IPE toolbox and click on "Uninstall"

Deleting the Code in Personal JS Manually

Delete the code down below at you personal JS page (User:YourUserName/common.js):

mw.loader.load('https://common.wjghj.cn/js/InPageEdit-v2');

Note: After saving, you have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold ⇧ Shift while clicking Reload, or press either Ctrl+F5 or Ctrl+R (⌘ Cmd+R on a Mac)
  • Google Chrome: Press Ctrl+⇧ Shift+R (⌘ Cmd+⇧ Shift+R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl+F5
  • Opera: Clear the cache in Tools → Preferences

Delete LocalStorage Manually

The plugin will save LocalStorage in your browser, here's the deleting method:

  • Firefox:Open your browser Console (F12) → Storage (Shift+F9), find LocalStorage, Delete keyInPageEditPreferenceandInPageEditVersion, right click → delete
  • Chrome:Open your browser Console (F12) → Application → findLocalStorage → select keysInPageEditPreferenceandInPageEditVersion → right click → delete

Tech Details

Tech Used

  • Using jQuery
  • Using mw.api
  • Using localStorage
  • Using ssi-modal for modal boxes
  • Using AJAX 🔥Pro Plus Max S X R EX🔥 Technology
  • Using ECharts for analysis charts
  • Using PHP7.3 + MariaDB10 for analysis
  • Using Inno DB for analysis database engine

Style Design

  • The style is OOUI-liked, reducing by CSS

Platform Supported

  • IE NOT SUPPORTED
  • Non-UCP Fandom platform not supported because of the very outdated jQuery version (1.8.1) 👎👎👎
  • MediaWiki > 1.22.0
  • jQuery > 2.2.0
  • UCP and Gamepedia platform Supported

Version

See Version_info

Source Code

JavaScript
CSS

Trivia

  • The plugin is inspired by MoegirlPedia user 妹空酱's Quick Edit plugin WikiPlus
    • Because of the terrible support for mobile device and terrible green color, plus there's no Fandom/Wikia platform support, 机智的小鱼君 decided to develop a Quick Edit plugin on his own
    • The original purpose of this plugin is actually get WikiPlus onto Fandom platform
    • Unfortunately and dramatically, this plugin also does not support the original Fandom platform😂
  • Although the name of the plugin is "InPageEdit", actually IPE is providing more freatures than W+, like Quick Diff and Quick Rename
  • At first, the plugin uses Fandom Design System, but later switched to OOUI-liked design style. But the plugin uses CSS rather than use OOJS directly. The source code can be found in the list above
  • The plugin is collecting non-private data for usage statistic and research since January 5th, 2020
    • The analysis data can be viewed at /analysis
    • The analysis system is developed from 4pm of January 4th till the midnight of the next day
    • The charts of the analysis webpage is using ECharts, and its development team used to be a property of Baidu inc., but was takeovered by the Apache Foundation, and is now leaded by Chinese developers

InPageEdit-v2 is a MediaWiki plugin based on JavaScript. And write by 机智的小鱼君.
© Original by Wjghj Project, GNU General Public License 3.0 (2019- )
See more: Plugin page Version info Contact author