Entry Point:
Entry Point:
Individual menus:
Libraries used:
Auxiliary files:
More details at User:Subh83/Javascripts.
Adds right-click menus to different components on a Wikipedia page. See the "Menus" section below for description of the individual menus.
The scripts have been tested on Google Chrome and Firefox browsers.
In the page User:<your_username>/common.js add the following line:
importScript('User:Subh83/JavaScriptTools/RightclickMenus.js');
Just before the importScript line, you can set the variable RightClickMenuKey to one of the values from 'shift', 'alt' or 'ctrl' to enforce pressing the corresponding key for the right-click menu to appear. For example,
var RightClickMenuKey = 'ctrl';
The default CSS style sheet used for the menus and floating panels is User:Subh83/JavaScriptTools/Menus.css. You can use your own style sheet by setting the value of the FloatingMenusStyleFile javascript variable. For example, right before the importScript line, you can add,
var FloatingMenusStyleFile = "User:<your_username>/myMenuStyles.css";
See below.
Below is a description of all the menus currently available through this script.

The menu appears when you right-click on a selected text on a Wikipedia page.
Currently, available items in this menu:

The menu appears when you right click on a reference on a Wikipedia page (one like [1]).
Currently available items in this menu:

The menu appears when you right-click on a textarea (edit box) when editing the wikitext.
Currently available items in this menu:

The floating panel with symbol & markups is highly customizable. By default it uses a list of symbols from User:Subh83/JavaScriptTools/SymbolsAndMarkups.
You can use a different symbols & markup list to create your own custom panel contents. For doing this, you'll need to set the FloatingMovableMenuSource javascript variable to point to the file/page of your choice. The page above with the default list describes the syntax.
For example, you can add the following line of code before the importScript line in your common.js file
var FloatingMovableMenuSource = "User:<your_username>/myCustomSymbolsAndMarkups";
Q: I changed the FloatingMovableMenuSource variable or changed the contents of the Markup & Symbols page. But the changes are not showing up.
Q: I have set some of the customization variable, but the change is not showing.
importScript line.Q: "Edit this text" menu item not working.
Q: WikiBlame is not working.
Q: I use Internet Explorer. The script does not work for me.
Q: When I click "edit this text" I get an error message "Sorry, the wiki-text could not be located...".
Please use the talk page.
There are a host of useful javascript utilities I have written up while working on this project. You can find a complete list at User:Subh83/Javascripts.
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.