Difference between revisions of "MediaWiki:Common.js"
From PCGamingWiki, the wiki about fixing PC games
m |
m (Added path dropdown.) |
||
Line 1: | Line 1: | ||
var customizeToolbar = function() { | var customizeToolbar = function() { | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
− | + | sections: { | |
− | + | 'templates': { | |
− | templates: { | + | type: 'toolbar', |
− | + | label: 'Templates', | |
− | + | groups: { | |
− | + | templates: { | |
− | + | 'label': 'Templates', | |
− | + | 'tools': { | |
− | + | 'availability': { | |
− | + | label: 'Availability', | |
− | + | type: 'button', | |
− | + | icon: '//pcgamingwiki.com/images/3/3f/Editor_Icon_-_Availability.svg', | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: " | + | pre: "{{Availability/row| ", |
+ | peri: "store", | ||
+ | post: " | DRM | notes | Key }}", | ||
+ | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'dlc': { |
− | label: ' | + | label: 'DLC', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/3/38/Editor_Icon_-_DLCtable.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: " | + | pre: "{{DLC|\n", |
− | + | peri: "{{DLC/row| Name | notes | OS }}", | |
− | + | post: "\n}}", | |
− | + | ownline: true | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'dlcrow': { |
− | label: ' | + | label: 'DLC Row', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/9/9f/Editor_Icon_-_DLCrow.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: " | + | pre: "{{DLC/row| ", |
− | + | peri: "Name", | |
− | + | post: " | notes | OS }}", | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'gamedata': { |
− | label: ' | + | label: 'Game data', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/f/fe/Editor_Icon_-_Game_Data.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: "{{ | + | pre: "{{Game data/row|", |
− | post: "}}", | + | peri: "System", |
+ | post: "|Path}}", | ||
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'cloud': { |
− | label: ' | + | label: 'Cloud syncing', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/b/bc/Editor_Icon_-_Cloud_Sync.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: "{{ | + | pre: "===[[Glossary:Save game cloud syncing|Save game cloud syncing]]===\n{{Save game cloud syncing\n|origin = \n|origin notes = \n|steam cloud = \n|steam cloud notes = \n|uplay = \n|uplay notes = \n|gamesave manager = \n|gamesave manager notes= \n}}", |
− | |||
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'sysreq': { |
− | label: ' | + | label: 'Sysreq', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/4/4b/Editor_Icon_-_System_Requirements.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: "{{ | + | pre: "{{System requirements\n|OSfamily = ", |
− | post: "", | + | peri: "System", |
+ | post: "\n|minOS = \n|minCPU = \n|minRAM = \n|minHD = \n|minGPU = \n\n|recOS = \n|recCPU = \n|recRAM = \n|recHD = \n|recGPU = \n}}", | ||
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'fixbox': { |
− | label: ' | + | label: 'Fixbox', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/d/d8/Editor_Icon_-_Fixbox.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: "{{ | + | pre: "{{Fixbox|1=\n{{Fixbox/fix|", |
− | post: "}}", | + | peri: "Name", |
+ | post: "|ref=<ref>Reference</ref>}}\n}}", | ||
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'lang': { |
− | label: ' | + | label: 'Language', |
+ | type: 'button', | ||
+ | icon: '//pcgamingwiki.com/images/2/22/Editor_Icon_-_Localizations.svg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
− | pre: "{{ | + | pre: "{{L10n/switch\n |language = \n", |
− | post: "}}", | + | post: " |interface = yes\n |audio = \n |subtitles = \n |notes = \n |fan = \n |fan notes = \n}}", |
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'seesection': { |
− | label: ' | + | label: 'See...', |
− | action: { | + | type: 'select', |
− | type: 'encapsulate', | + | list: { |
− | options: { | + | 'widescreen': { |
− | pre: "{{ | + | label: 'Widescreen resolution', |
− | + | action: { | |
− | + | type: 'encapsulate', | |
− | + | options: { | |
+ | pre: "See [[#Widescreen resolution|Widescreen resolution]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'multimonitor': { | ||
+ | label: 'Multi-monitor', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Multi-monitor|Multi-monitor]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'ultrawidescreen': { | ||
+ | label: 'Ultra-widescreen', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Ultra-widescreen|Ultra-widescreen]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | '4kultrahd': { | ||
+ | label: '4K Ultra HD', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#4K Ultra HD|4K Ultra HD]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'fieldofview': { | ||
+ | label: 'Field of view (FOV)', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Field of view (FOV)|Field of view (FOV)]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'windowed': { | ||
+ | label: 'Windowed', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Windowed|Windowed]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'borderless': { | ||
+ | label: 'Borderless fullscreen windowed', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Borderless fullscreen windowed|Borderless fullscreen windowed]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'anisotropic': { | ||
+ | label: 'Anisotropic filtering (AF)', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Anisotropic filtering (AF)|Anisotropic filtering (AF)]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'antialiasing': { | ||
+ | label: 'Anti-aliasing (AA)', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Anti-aliasing (AA)|Anti-aliasing (AA)]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'vsync': { | ||
+ | label: 'Vertical sync (Vsync)', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Vertical sync (Vsync)|Vertical sync (Vsync)]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'oculus': { | ||
+ | label: 'Oculus Rift', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Oculus Rift|Oculus Rift]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'highframe': { | ||
+ | label: 'High frame rate', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#High frame rate|High frame rate]]. " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'colorblind': { | ||
+ | label: 'Color blind mode', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Color blind mode|Color blind mode]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'remapping': { | ||
+ | label: 'Remapping', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Remapping|Remapping]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'mouseaccel': { | ||
+ | label: 'Mouse acceleration', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Mouse acceleration|Mouse acceleration]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'controllersupport': { | ||
+ | label: 'Controller support', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Controller support|Controller support]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'controllerremap': { | ||
+ | label: 'Controller remapping', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Controller remapping|Controller remapping]]." | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'touchscreen': { | ||
+ | label: 'Touchscreen optimised', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "See [[#Touchscreen|Touchscreen]]." | ||
+ | } | ||
+ | } | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'infoboxdrop': { |
− | label: 'OS X release date', | + | label: 'Infobox row', |
− | + | type: 'select', | |
− | type: 'encapsulate', | + | list: { |
− | + | 'infoboxdeveloper': { | |
− | + | label: 'Developer', | |
− | peri: "Month dd, yyyy", | + | action: { |
− | + | type: 'encapsulate', | |
− | + | options: { | |
+ | pre: "{{Infobox game/row/developer|", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxporterwindows': { | ||
+ | label: 'Windows porter', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/winporter|", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxporterosx': { | ||
+ | label: 'OS X porter', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/osxporter|", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxporterlinux': { | ||
+ | label: 'Linux porter', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/linporter|", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxpublisher': { | ||
+ | label: 'Publisher', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/publisher|", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxengine': { | ||
+ | label: 'Engine', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/engine|", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxdatewindows': { | ||
+ | label: 'Windows release date', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/date|Windows|", | ||
+ | peri: "Month dd, yyyy", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxdateosx': { | ||
+ | label: 'OS X release date', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/date|OS X|", | ||
+ | peri: "Month dd, yyyy", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'infoboxdatelinux': { | ||
+ | label: 'Linux release date', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Infobox game/row/date|Linux|", | ||
+ | peri: "Month dd, yyyy", | ||
+ | post: "}}", | ||
+ | ownline: true | ||
+ | } | ||
+ | } | ||
} | } | ||
} | } | ||
}, | }, | ||
− | ' | + | 'filepath': { |
− | label: ' | + | label: 'Path', |
− | action: { | + | type: 'select', |
− | type: 'encapsulate', | + | list: { |
− | options: { | + | 'pathgame': { |
− | pre: "{{ | + | label: 'Path to game', |
− | + | action: { | |
− | + | type: 'encapsulate', | |
− | + | options: { | |
− | } | + | pre: "{{P|game}}" |
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathuid': { | ||
+ | label: 'User ID', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|uid}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathhkcu': { | ||
+ | label: 'HKEY_CURRENT_USER', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|hkcu}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathhklm': { | ||
+ | label: 'HKEY_LOCAL_MACHINE', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|hklm}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathuserprofile': { | ||
+ | label: '%USERPROFILE%', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|userprofile}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathappdata': { | ||
+ | label: '%APPDATA%', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|appdata}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathlocalappdata': { | ||
+ | label: '%LOCALAPPDATA%', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|localappdata}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathpublic': { | ||
+ | label: '%PUBLIC%', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|public}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathprogramdata': { | ||
+ | label: '%PROGRAMDATA%', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|programdata}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathwindir': { | ||
+ | label: '%WINDIR%', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|windir}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathsteam': { | ||
+ | label: 'Steam folder', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|steam}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | 'pathuplay': { | ||
+ | label: 'Uplay folder', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{P|uplay}}" | ||
+ | } | ||
+ | } | ||
+ | }, | ||
} | } | ||
} | } |
Revision as of 22:58, 30 October 2014
var customizeToolbar = function() { $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { sections: { 'templates': { type: 'toolbar', label: 'Templates', groups: { templates: { 'label': 'Templates', 'tools': { 'availability': { label: 'Availability', type: 'button', icon: '//pcgamingwiki.com/images/3/3f/Editor_Icon_-_Availability.svg', action: { type: 'encapsulate', options: { pre: "{{Availability/row| ", peri: "store", post: " | DRM | notes | Key }}", ownline: true } } }, 'dlc': { label: 'DLC', type: 'button', icon: '//pcgamingwiki.com/images/3/38/Editor_Icon_-_DLCtable.svg', action: { type: 'encapsulate', options: { pre: "{{DLC|\n", peri: "{{DLC/row| Name | notes | OS }}", post: "\n}}", ownline: true } } }, 'dlcrow': { label: 'DLC Row', type: 'button', icon: '//pcgamingwiki.com/images/9/9f/Editor_Icon_-_DLCrow.svg', action: { type: 'encapsulate', options: { pre: "{{DLC/row| ", peri: "Name", post: " | notes | OS }}", ownline: true } } }, 'gamedata': { label: 'Game data', type: 'button', icon: '//pcgamingwiki.com/images/f/fe/Editor_Icon_-_Game_Data.svg', action: { type: 'encapsulate', options: { pre: "{{Game data/row|", peri: "System", post: "|Path}}", ownline: true } } }, 'cloud': { label: 'Cloud syncing', type: 'button', icon: '//pcgamingwiki.com/images/b/bc/Editor_Icon_-_Cloud_Sync.svg', action: { type: 'encapsulate', options: { pre: "===[[Glossary:Save game cloud syncing|Save game cloud syncing]]===\n{{Save game cloud syncing\n|origin = \n|origin notes = \n|steam cloud = \n|steam cloud notes = \n|uplay = \n|uplay notes = \n|gamesave manager = \n|gamesave manager notes= \n}}", ownline: true } } }, 'sysreq': { label: 'Sysreq', type: 'button', icon: '//pcgamingwiki.com/images/4/4b/Editor_Icon_-_System_Requirements.svg', action: { type: 'encapsulate', options: { pre: "{{System requirements\n|OSfamily = ", peri: "System", post: "\n|minOS = \n|minCPU = \n|minRAM = \n|minHD = \n|minGPU = \n\n|recOS = \n|recCPU = \n|recRAM = \n|recHD = \n|recGPU = \n}}", ownline: true } } }, 'fixbox': { label: 'Fixbox', type: 'button', icon: '//pcgamingwiki.com/images/d/d8/Editor_Icon_-_Fixbox.svg', action: { type: 'encapsulate', options: { pre: "{{Fixbox|1=\n{{Fixbox/fix|", peri: "Name", post: "|ref=<ref>Reference</ref>}}\n}}", ownline: true } } }, 'lang': { label: 'Language', type: 'button', icon: '//pcgamingwiki.com/images/2/22/Editor_Icon_-_Localizations.svg', action: { type: 'encapsulate', options: { pre: "{{L10n/switch\n |language = \n", post: " |interface = yes\n |audio = \n |subtitles = \n |notes = \n |fan = \n |fan notes = \n}}", ownline: true } } }, 'seesection': { label: 'See...', type: 'select', list: { 'widescreen': { label: 'Widescreen resolution', action: { type: 'encapsulate', options: { pre: "See [[#Widescreen resolution|Widescreen resolution]]." } } }, 'multimonitor': { label: 'Multi-monitor', action: { type: 'encapsulate', options: { pre: "See [[#Multi-monitor|Multi-monitor]]." } } }, 'ultrawidescreen': { label: 'Ultra-widescreen', action: { type: 'encapsulate', options: { pre: "See [[#Ultra-widescreen|Ultra-widescreen]]." } } }, '4kultrahd': { label: '4K Ultra HD', action: { type: 'encapsulate', options: { pre: "See [[#4K Ultra HD|4K Ultra HD]]." } } }, 'fieldofview': { label: 'Field of view (FOV)', action: { type: 'encapsulate', options: { pre: "See [[#Field of view (FOV)|Field of view (FOV)]]." } } }, 'windowed': { label: 'Windowed', action: { type: 'encapsulate', options: { pre: "See [[#Windowed|Windowed]]." } } }, 'borderless': { label: 'Borderless fullscreen windowed', action: { type: 'encapsulate', options: { pre: "See [[#Borderless fullscreen windowed|Borderless fullscreen windowed]]." } } }, 'anisotropic': { label: 'Anisotropic filtering (AF)', action: { type: 'encapsulate', options: { pre: "See [[#Anisotropic filtering (AF)|Anisotropic filtering (AF)]]." } } }, 'antialiasing': { label: 'Anti-aliasing (AA)', action: { type: 'encapsulate', options: { pre: "See [[#Anti-aliasing (AA)|Anti-aliasing (AA)]]." } } }, 'vsync': { label: 'Vertical sync (Vsync)', action: { type: 'encapsulate', options: { pre: "See [[#Vertical sync (Vsync)|Vertical sync (Vsync)]]." } } }, 'oculus': { label: 'Oculus Rift', action: { type: 'encapsulate', options: { pre: "See [[#Oculus Rift|Oculus Rift]]." } } }, 'highframe': { label: 'High frame rate', action: { type: 'encapsulate', options: { pre: "See [[#High frame rate|High frame rate]]. " } } }, 'colorblind': { label: 'Color blind mode', action: { type: 'encapsulate', options: { pre: "See [[#Color blind mode|Color blind mode]]." } } }, 'remapping': { label: 'Remapping', action: { type: 'encapsulate', options: { pre: "See [[#Remapping|Remapping]]." } } }, 'mouseaccel': { label: 'Mouse acceleration', action: { type: 'encapsulate', options: { pre: "See [[#Mouse acceleration|Mouse acceleration]]." } } }, 'controllersupport': { label: 'Controller support', action: { type: 'encapsulate', options: { pre: "See [[#Controller support|Controller support]]." } } }, 'controllerremap': { label: 'Controller remapping', action: { type: 'encapsulate', options: { pre: "See [[#Controller remapping|Controller remapping]]." } } }, 'touchscreen': { label: 'Touchscreen optimised', action: { type: 'encapsulate', options: { pre: "See [[#Touchscreen|Touchscreen]]." } } } } }, 'infoboxdrop': { label: 'Infobox row', type: 'select', list: { 'infoboxdeveloper': { label: 'Developer', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/developer|", post: "}}", ownline: true } } }, 'infoboxporterwindows': { label: 'Windows porter', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/winporter|", post: "}}", ownline: true } } }, 'infoboxporterosx': { label: 'OS X porter', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/osxporter|", post: "}}", ownline: true } } }, 'infoboxporterlinux': { label: 'Linux porter', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/linporter|", post: "}}", ownline: true } } }, 'infoboxpublisher': { label: 'Publisher', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/publisher|", post: "}}", ownline: true } } }, 'infoboxengine': { label: 'Engine', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/engine|", post: "}}", ownline: true } } }, 'infoboxdatewindows': { label: 'Windows release date', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/date|Windows|", peri: "Month dd, yyyy", post: "}}", ownline: true } } }, 'infoboxdateosx': { label: 'OS X release date', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/date|OS X|", peri: "Month dd, yyyy", post: "}}", ownline: true } } }, 'infoboxdatelinux': { label: 'Linux release date', action: { type: 'encapsulate', options: { pre: "{{Infobox game/row/date|Linux|", peri: "Month dd, yyyy", post: "}}", ownline: true } } } } }, 'filepath': { label: 'Path', type: 'select', list: { 'pathgame': { label: 'Path to game', action: { type: 'encapsulate', options: { pre: "{{P|game}}" } } }, 'pathuid': { label: 'User ID', action: { type: 'encapsulate', options: { pre: "{{P|uid}}" } } }, 'pathhkcu': { label: 'HKEY_CURRENT_USER', action: { type: 'encapsulate', options: { pre: "{{P|hkcu}}" } } }, 'pathhklm': { label: 'HKEY_LOCAL_MACHINE', action: { type: 'encapsulate', options: { pre: "{{P|hklm}}" } } }, 'pathuserprofile': { label: '%USERPROFILE%', action: { type: 'encapsulate', options: { pre: "{{P|userprofile}}" } } }, 'pathappdata': { label: '%APPDATA%', action: { type: 'encapsulate', options: { pre: "{{P|appdata}}" } } }, 'pathlocalappdata': { label: '%LOCALAPPDATA%', action: { type: 'encapsulate', options: { pre: "{{P|localappdata}}" } } }, 'pathpublic': { label: '%PUBLIC%', action: { type: 'encapsulate', options: { pre: "{{P|public}}" } } }, 'pathprogramdata': { label: '%PROGRAMDATA%', action: { type: 'encapsulate', options: { pre: "{{P|programdata}}" } } }, 'pathwindir': { label: '%WINDIR%', action: { type: 'encapsulate', options: { pre: "{{P|windir}}" } } }, 'pathsteam': { label: 'Steam folder', action: { type: 'encapsulate', options: { pre: "{{P|steam}}" } } }, 'pathuplay': { label: 'Uplay folder', action: { type: 'encapsulate', options: { pre: "{{P|uplay}}" } } }, } } } } } } } } ); }; /* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */ if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) { mw.loader.using( 'user.options', function () { // This can be the string "0" if the user disabled the preference ([[bugzilla:52542#c3]]) if ( mw.user.options.get( 'usebetatoolbar' ) == 1 && mw.user.options.get( 'showtoolbar' ) == 1 ) { $.when( mw.loader.using( 'ext.wikiEditor.toolbar' ), $.ready ).then( customizeToolbar ); } } ); } function addAnchorInHeaders() { $('span.mw-headline', '#mw-content-text').each(function() { var $this = $(this); if ($this.attr('id') !== undefined) { $('<span class="mw-linkhere"></span>').text(' • ').append( $('<a></a>').text('Link').attr({title: 'Link', href: '#'+$this.attr('id')}) ).appendTo(this); } }); } $(addAnchorInHeaders); var CJ = 'http://www.dpbolvw.net/click-6723194-10912384?url='; var CJ_Domains = new Array('greenmangaming.com', 'gamersgate.co.uk', 'gamefly.com', 'gamefly.co.uk', 'gamersgate.com', 'newegg.com'); var LinkShare = ''; var LinkShare_Domains = new Array('origin.com'); var Amazon = 'tag=pcgamingwiki-20'; var AmazonUK = 'tag=pcgamingwiki-21'; var GoG = 'pp=708a77db476d737e54b8bf4663fc79b346d696d2'; function UpdateLinkRedirection(storeDomain, affTag, before) { $("a[href*='" + storeDomain + "']").bind('click keypress mouseup', function(event) { event.preventDefault(); var link = this.href; var newLink; if(before) { newLink = affTag + link } else { var queryParam = link.indexOf("?") !== -1 ? '&' : '?'; newLink = link + queryParam + affTag; } if (storeDomain==CJ_Domains[0]) { newLink = newLink + "?gmgr=jivalane"; } var code = event.charCode || event.keyCode; var button = event.button; if((!code || (code && code == 13)) && (!button || (button && button == 0))) { window.location = newLink; } else if(button && button === 1) { window.open(newLink); } }); } $(document).ready(function() { //--CJ $.each(CJ_Domains, function(index, domain) { UpdateLinkRedirection(domain, CJ, true); }); //--Linkshare $.each(LinkShare_Domains, function(index, domain) { UpdateLinkRedirection(domain, LinkShare, true); }); //--Amazon UpdateLinkRedirection('amazon.com', Amazon, false); UpdateLinkRedirection('amazon.co.uk', AmazonUK, false) //--GoG UpdateLinkRedirection('gog.com', GoG, false); });