Fandom Developers Wiki
No edit summary
(updates)
Line 3: Line 3:
 
| Scope = Personal use only
 
| Scope = Personal use only
 
| Author = [[User:Mathmagician|Mathmagician]]
 
| Author = [[User:Mathmagician|Mathmagician]]
| Updated = 8 November 2012
+
| Updated = 20 April 2013
 
| Code = [[/code.js]]
 
| Code = [[/code.js]]
 
| Skins = Oasis
 
| Skins = Oasis
 
| Languages = All
 
| Languages = All
 
}}
 
}}
The '''NoImageLightbox''' script disables Wikia's new Lightbox loader so that clicking on an image properly takes you to its File: page.
+
The '''NoImageLightbox''' script disables Wikia's Lightbox loader in the Oasis skin so that clicking on an image takes you to its File: page, as is the default functionality of the Monobook skin.
   
Videos use the same lightbox loader, but this script uses a trick to make sure that videos are still playable when clicked on. To go to the File: page for a video, you can right-click and open the link in a new window.
+
Videos use the same lightbox loader, but default expected behavior for this script is that videos should not be affected and should continue to play normally on content pages.
   
  +
To go to the File: page of a video, right-click on the video and choose the '''Open link in new tab''' option instead.
Tested mainly in Chrome & Firefox.
 
   
 
==Installation==
 
==Installation==
  +
:''See also: [[Help:JavaScript and CSS Cheatsheet]]''
To install this script, you can put the following code in [[w:Special:MyPage/global.js|your global.js]] on Community Central, or in another JavaScript file of your choice (see [[Help:JavaScript and CSS Cheatsheet]]).
+
To install this script, place the following code in [[w:Special:MyPage/global.js|your global.js]] on Community Central, or in another user JavaScript file of your choice.
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
 
// http://dev.wikia.com/wiki/NoImageLightbox
 
// http://dev.wikia.com/wiki/NoImageLightbox
Line 21: Line 22:
 
</syntaxhighlight>
 
</syntaxhighlight>
   
  +
==Configuration==
Admins: this is a user script for personal use only, do not install it wiki-wide for all users. The Image Lightbox is something that Wikia considers a critical part of the user interface. ''Any'' attempt to disable it wiki-wide is considered a [[w:Terms of Use|Terms of Use]] violation.
 
  +
As of 20 April 2013, this script includes an option to completely disable the lightbox for videos as well as images. To enable this option, set <code>window.NoImageLightbox.novideo</code> to the value <code>true</code> during installation, like so:
  +
<syntaxhighlight lang="javascript">
  +
window.NoImageLightbox = { novideo: true };
  +
  +
importScriptPage('NoImageLightbox/code.js', 'dev');
  +
</syntaxhighlight>
  +
'''Note:''' Config options must go '''above''' the import statement.
   
 
==Updates==
 
==Updates==
  +
;20 April 2013
  +
:[[User:Mathmagician|Mathmagician]]: Pushed script re-write to fix script breaking as a result of Wikia changes. Also added new (optional) configuration option to completely disable the lightbox (affects both videos and images).
 
;8 November 2012
 
;8 November 2012
 
:[[User:Mathmagician|Mathmagician]]: Fixed [[w:Forum:Gallery_Link_Problem|bug]] where linking for images such as <nowiki>[[File:Image.png|link=SomePage]]</nowiki> wasn't working
 
:[[User:Mathmagician|Mathmagician]]: Fixed [[w:Forum:Gallery_Link_Problem|bug]] where linking for images such as <nowiki>[[File:Image.png|link=SomePage]]</nowiki> wasn't working

Revision as of 23:25, 20 April 2013

This script/stylesheet is for PERSONAL use only!

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

The NoImageLightbox script disables Wikia's Lightbox loader in the Oasis skin so that clicking on an image takes you to its File: page, as is the default functionality of the Monobook skin.

Videos use the same lightbox loader, but default expected behavior for this script is that videos should not be affected and should continue to play normally on content pages.

To go to the File: page of a video, right-click on the video and choose the Open link in new tab option instead.

Installation

See also: Help:JavaScript and CSS Cheatsheet

To install this script, place the following code in your global.js on Community Central, or in another user JavaScript file of your choice.

// http://dev.wikia.com/wiki/NoImageLightbox
importScriptPage('NoImageLightbox/code.js', 'dev');

Configuration

As of 20 April 2013, this script includes an option to completely disable the lightbox for videos as well as images. To enable this option, set window.NoImageLightbox.novideo to the value true during installation, like so:

window.NoImageLightbox = { novideo: true };

importScriptPage('NoImageLightbox/code.js', 'dev');

Note: Config options must go above the import statement.

Updates

20 April 2013
Mathmagician: Pushed script re-write to fix script breaking as a result of Wikia changes. Also added new (optional) configuration option to completely disable the lightbox (affects both videos and images).
8 November 2012
Mathmagician: Fixed bug where linking for images such as [[File:Image.png|link=SomePage]] wasn't working
6 August 2012
Mathmagician: Created.