Difference between revisions of "User:ArchivesPUG/common.js"

From GATE
Line 9: Line 9:
 
  */
 
  */
 
$( function () {
 
$( function () {
$( '#mw-content-text' ).on( 'click', '.smw-datatable.smw-placeholder > a', function () {
+
$( '#mw-content-text' ).on( 'click', '.dataTables_wrapper.no-footer > a', function () {
 
var otherWindow = window.open();
 
var otherWindow = window.open();
 
otherWindow.opener = null;
 
otherWindow.opener = null;

Revision as of 13:28, 4 February 2020

// [[Wikipedia:Tools/Navigation popups]]
mw.loader.load('https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups');
window.popupStructure = 'menus';
window.popupCategoryMembers = 'false';

/**
 * @source https://www.mediawiki.org/wiki/Snippets/Open_specific_links_in_new_window
 * @version 2018-09-15
 */
$( function () {
	$( '#mw-content-text' ).on( 'click', '.dataTables_wrapper.no-footer > a', function () {
		var otherWindow = window.open();
		otherWindow.opener = null;
		otherWindow.location = this;
		return false;
	} );
} );