v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Lethosor/JSMenu"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (Created page)
 
m (update)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is my project page for JavaScript plugins. The script can be found [[./main.js|here]]. Note that it uses jQuery - the version on this wiki is 1.4.2.  
+
This is my project page for JavaScript plugins. The script can be found [[User:Lethosor/main.js|here]]. Note that it uses jQuery 1.9, which could cause a few problems with existing scripts. Let me know of any incompatibilities you find.
 +
 
 +
Most of this is still under construction.
  
 
==Installation (not really)==
 
==Installation (not really)==
You need to  import [[./main.js|this script]] in your user JavaScript page. It could be at (USERPAGE)/common.js or (USERPAGE)/monobook.js (if you don't know, it's probably common.js). Add the following line (don't worry if the page doesn't exist yet):
+
You need to  import [[User:Lethosor/main.js|this script]] in your [[Special:Mypage/common.js|user JavaScript page]] (although technically you can also use [[Special:Mypage/vector.js|this page]] if you use the vector theme (the default). You can find your theme under Preferences → Appearance.)
 +
 
 +
Add the following line (don't worry if the page doesn't exist yet):
 
<pre>
 
<pre>
 
importScript("User:Lethosor/main.js");
 
importScript("User:Lethosor/main.js");
Line 11: Line 15:
  
 
==Advanced options==
 
==Advanced options==
 +
{{hidden|Documentation|
 
Under construction for now, most of this is still to be worked on before it's released.
 
Under construction for now, most of this is still to be worked on before it's released.
  
Line 37: Line 42:
 
====show_overlay====
 
====show_overlay====
 
<code>true</code> shows the grey overlay when the menu appears. <code>false</code> doesn't.
 
<code>true</code> shows the grey overlay when the menu appears. <code>false</code> doesn't.
 
+
}}
==Technical==
 
I use <code>delegate()</code> for some event handlers, which won't work prior to jQuery 1.4.2. It's deprecated in 1.9.0, but it works.
 

Latest revision as of 20:42, 20 March 2013

This is my project page for JavaScript plugins. The script can be found here. Note that it uses jQuery 1.9, which could cause a few problems with existing scripts. Let me know of any incompatibilities you find.

Most of this is still under construction.

Installation (not really)[edit]

You need to import this script in your user JavaScript page (although technically you can also use this page if you use the vector theme (the default). You can find your theme under Preferences → Appearance.)

Add the following line (don't worry if the page doesn't exist yet):

importScript("User:Lethosor/main.js");

If you don't have permission to create that page, send me a message.

Save the page, then reload again. "LethosorMenu" should appear in the navigation bar at the top (by the "Log out" link). If it doesn't, follow the instructions on your user JavaScript page to empty the cache.

Advanced options[edit]