Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// gn0Marks ////// A bookmarking tool for Wikipedia.// Adapted (i.e., jury-rigged) in 2015 by User:Gxnx0xmx0xn on enwp from WikiMarks by User:Twinzor on enwp.//// See User:Gxnx0xmx0xn/gn0Marks for more info on installation.//////////////////////////// //// gn0m0n.com //// //////////////// // ////////////// // ////////////// // ////////////// // ////////////// // ////////////// // //////////////////////////// PS: I don't really know JavaScript so this is probably a klugey solution. But it works for me.//Reading configuration or setting defaults if not present:if(typeofmarkThisTabTitleConfig=='undefined'){if(vulgar===0|typeofvulgar=='undefined'){varmarkThisTitle="Add to gn0Marks";}else{if(vulgar==1){varmarkThisTitle="Mark this shit";}}}else{varmarkThisTitle=markThisTabTitleConfig;}if(typeofmyMarksTitleConfig=='undefined'){if(vulgar===0|typeofvulgar=='undefined'){varmyMarksTitle="My gn0Marks";}else{if(vulgar==1){varmyMarksTitle="My motherfuckin' gn0Marks";}}}else{varmarkThisTitle=markThisTabTitleConfig;}if(typeofWikimarkConfigWikimarksPage=='undefined'){varwikimarkspage="/mygn0Marks";}else{varwikimarkspage="/"+WikimarkConfigWikimarksPage;}if(typeofWikimarkConfigKeepSection=='undefined'){varwikimarksect=0;}else{varwikimarksect=WikimarkConfigKeepSection;}if(typeofWikimarkConfigListType=='undefined'){varlisttype="*";}else{varlisttype=WikimarkConfigListType;}if(typeofWikimarkConfigAddMenu=='undefined'){varaddMenulocation="p-cactions";varmenuPrefix="ca-";}elseif(WikimarkConfigAddMenu=="cactions"){varaddMenulocation="p-cactions";varmenuPrefix="ca-";}elseif(WikimarkConfigAddMenu=="personal"){varaddMenulocation="p-personal";varmenuPrefix="pt-";}elseif(WikimarkConfigAddMenu=="toolbox"){varaddMenulocation="p-tb";varmenuPrefix="t-";}elseif(WikimarkConfigAddMenu=="navigation"){varaddMenulocation="p-navigation";varmenuPrefix="n-";}else{varaddMenulocation="p-cactions";varmenuPrefix="ca-";}if(typeofWikimarkConfigViewMenu=='undefined'){varviewMenulocation="p-cactions";varmenuPrefixV="ca-";}elseif(WikimarkConfigViewMenu=="cactions"){varviewMenulocation="p-cactions";varmenuPrefixV="ca-";}elseif(WikimarkConfigViewMenu=="personal"){varviewMenulocation="p-personal";varmenuPrefixV="pt-";}elseif(WikimarkConfigViewMenu=="toolbox"){varviewMenulocation="p-tb";varmenuPrefixV="t-";}elseif(WikimarkConfigViewMenu=="navigation"){varviewMenulocation="p-navigation";varmenuPrefixV="n-";}else{varviewMenulocation="p-cactions";varmenuPrefixV="ca-";}if(typeofWikimarkConfigWikimarksUsername=='undefined'){varwikimarkEncodedUserName=encodeURIComponent(wgUserName);}else{varwikimarkEncodedUserName=WikimarkConfigWikimarksUsername;}varwikimarklinkprefix=wgServer+wgScript;$(WikiMarkInit);functionWikiMarkInit(){if(typeofWikimarkConfigViewNextTo=='undefined'){varviewNextto='';}else{varviewNextto=document.getElementById(menuPrefixV+WikimarkConfigViewNextTo);}if(typeofWikimarkConfigAddNextTo=='undefined'){varaddNextto='';}else{varaddNextto=document.getElementById(menuPrefix+WikimarkConfigAddNextTo);}addPortletLink(addMenulocation,'javascript:doAddWikiMark()',markThisTitle,menuPrefix+'addwikimark','Bookmark this page','',addNextto);addPortletLink(viewMenulocation,wikimarklinkprefix+"?title=User:"+wikimarkEncodedUserName+wikimarkspage,myMarksTitle,menuPrefixV+'showwikimark','Open your gn0Marks','',viewNextto);}functiondoAddWikiMark(){varwikimarkNewpage=wgPageName.replace(/_/g," ");if(wikimarkNewpage.indexOf("File:")==0){wikimarkNewpage=":"+wikimarkNewpage;}elseif(wikimarkNewpage.indexOf("Category:")==0){wikimarkNewpage=":"+wikimarkNewpage;}varwikimarkNewpageName=wikimarkNewpage;// if(wikimarksect == 1) {// var newpageURL = ___location.href;// if(newpageURL.indexOf("#")) {// anchor = newpageURL.split("#");// newpageSect = anchor[1];// var wikimarkNewpageLink = wikimarkNewpage;// wikimarkNewpage = wikimarkNewpage + "#" + newpageSect;// wikimarkNewpage = wikimarkNewpage.replace(/_/g, " ");// wikimarkNewpageName = wikimarkNewpageLink + " (Section: " + newpageSect + ")";// }// }varf;f=window.open(wikimarklinkprefix+"?title=User:"+wikimarkEncodedUserName+wikimarkspage+"&action=edit&output=embed")f.id="WikiMarksLoader";if(wikimarkNewpageName==wikimarkNewpage){varwikimarkLinktext=wikimarkNewpage;}else{varwikimarkLinktext=wikimarkNewpage+"|"+wikimarkNewpageName;}f.onload=function(){// var wikimark_cmt = "Adding [["+wikimarkNewpage+"]] to my WikiMarks list.";e=f.document.editform;e.wpTextbox1.value+=listtype+"["+"["+wikimarkLinktext+"]"+"]\n";// e.wpSummary.value=wikimark_cmt;e.wpSave.click();f.close();// This closes the gn0Marks window. You can comment it out if you prefer.if(vulgar===0|typeofvulgar=='undefined'){jsMsg("You're the man now, dawg. '''"+wikimarkNewpageName+"''' has been added to your gn0Marks.");}else{if(vulgar==1){jsMsg("Fuck yeah. '''"+wikimarkNewpageName+"''' has been added to your gn0Marks.");}}};}