User:Hedonil/XTools: Difference between revisions
Content deleted Content added
MusikAnimal (talk | contribs) the script as described no longer exists, showing soft redirect to modern XTools replacement Tag: Replaced |
|||
(24 intermediate revisions by 15 users not shown) | |||
Line 1: | Line 1: | ||
{{interwiki redirect|mw:XTools#ArticleInfo gadget}} |
|||
== Enable XTools gadget <sup style="color:green"> Now with cross-wiki notifications</sup> == |
|||
This is the gadget of [[toollabs:xtools|XTools]]. <br /> |
|||
It will add a line to the current page as shown in this example: (in fact, it's not yellow ) |
|||
<div style="border:1px solid gray; margin:10px 0px">[[File:XTools-JS-helper-v2.png|XTools gadget: Global notifications from 800+ wiki's]]</div> |
|||
[[File:XTools-JS-helper-tooltip.png|thumb| Show result summary of checks in tooltip]] |
|||
The color of ''<span style="color:orange"><em>See full page statistics</em></span>''-text changes, if the on-the-fly check (~ 1 sec) detects some issues. Currently the following checks are performed: |
|||
* Syntax: Known errors from [[:en:Wikipedia:WikiProject Check Wikipedia|WikiProject Check Wikipedia]] • [[toollabs:checkwiki]] |
|||
* Grammar: Checks with [[toollabs:languagetool|LanguageTool]] |
|||
* Wikidata: Checks several missing properties |
|||
* Links: Checks for broken links (beta) |
|||
You can quickly access the results via tooltip or see the full description in section #bugs <br> |
|||
The gadget text ist localized to the wiki's language, if it has been [https://translatewiki.net/w/i.php?title=Special:MessageGroupStats&language=en&group=tsint-xtools&setlang=de translated in translatewiki.net]. |
|||
[[File:XTools-JS-helper-v2-tooltip.png|thumb|XTools cross-wiki notifications]] |
|||
If you are logged in with Wikimedia OAuth, you can get cross-wiki notifications from over 800 wiki's! |
|||
* You can configure the XAgent here: [[File:Blue Fedora hat.png|16px]] [[toollabs:/xtools/agent/config.php| XAgent config]] |
|||
* How it works: |
|||
*# XAgent queries your most edited + your recent edited wiki's ([[toollabs:xtools/ec|as listed in X! Edit Counter]]) + the wiki's you specified in XAgent's config every 60 seconds for new notifications. |
|||
*# If you delete the session cookie or if the session ended, you'll have to login again. |
|||
*# If you see this icon: [[File:Blue Fedora hat.png|16px]], you are not logged in, otherwise a badge with the number of new (or zero) notifications is shown. Refresh your browser with {{key press|F5}} |
|||
* Enhancements of this feature are work in progress (as you might see on the config page) |
|||
* ENJOY the new feature! |
|||
=== 1. Normal method: ''common.js'' === |
|||
The most common way to activate this gadget is to insert the following line into your ''common.js''. |
|||
<syntaxhighlight lang="javascript"> |
|||
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript'); |
|||
</syntaxhighlight> |
|||
Copy the line above and paste it into your ''common.js'' (create new one, if it doesn't exist) |
|||
* For en.wikipedia: [[:en:Special:MyPage/common.js]] |
|||
* For de.wikipedia: [[:de:Special:MyPage/common.js]] |
|||
* ... |
|||
* For meta.wikimedia: [[:m:Special:MyPage/common.js]] |
|||
* For en.wikitionary: [[wikt:Special:MyPage/common.js]] |
|||
* For wikidata: [[:wikidata:Special:MyPage/common.js]] |
|||
* For commons: [[:commons:Special:MyPage/common.js]] |
|||
This works for the wiki where you modified the common.js and if you are logged in.<br/> |
|||
If you are using a script blocker like NoScript, ''wmflabs.org'' must be allowed. |
|||
=== 2. Alternative method: ''user script'' === |
|||
<syntaxhighlight lang="javascript"> |
|||
// ==UserScript== |
|||
// @name Wikipedia XTools gadget |
|||
// @namespace http://tools.wmflabs.org/xtools |
|||
// @description Provides instant meta information for all Wikimedia wikis. |
|||
// @match *://*.wikipedia.org/* |
|||
// @match *://*.wikimedia.org/* |
|||
// @match *://*.mediawiki.org/* |
|||
// @match *://*.wikidata.org/* |
|||
// @match *://*.wiktionary.org/* |
|||
// @match *://*.wikisource.org/* |
|||
// @match *://*.wikibooks.org/* |
|||
// @match *://*.wikinews.org/* |
|||
// @match *://*.wikiquote.org/* |
|||
// @match *://*.wikiversity.org/* |
|||
// @match *://*.wikivoyage.org/* |
|||
// @run-at document-end |
|||
// @version 1.0 |
|||
// @grant none |
|||
// ==/UserScript== |
|||
var src = '//meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript'; |
|||
var script = document.createElement('script'); |
|||
script.type = 'text/javascript'; |
|||
script.src = src; |
|||
(document.head||document.documentElement).appendChild(script); |
|||
script.parentNode.removeChild(script); |
|||
</syntaxhighlight> |
|||
* Save this snippet to file XAgent.user.js (.user.js is important) – or [[toollabs:xtools/static/XTools_gadget.user.js| download here]] with right mouse click -> Save Link As... |
|||
* Chrome/Chromium: [[File:VisualEditor_-_Icon_-_Menu.svg|20px]] -> Tools -> Extensions. Just drag & drop the file. |
|||
* Mozilla: ([https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey] required). Open blank page in browser -> drag & drop the file |
|||
* If you are using a script blocker like NoScript, ''wmflabs.org'' must be allowed. |
|||
* Advantages: |
|||
# all wikis/projects included out of the box |
|||
# quickly toggle the things on/off without editing your common.js |
|||
# works even if logged out |
|||
Feedback appreciated! If you want to comment the feature or if you have further suggestions (position of text, shown data, etc.), please leave a note on: |
|||
* [//bugzilla.wikimedia.org/enter_bug.cgi?product=Tool+Labs+tools&component=X!'s+tools Bugzilla] |
|||
* [//github.com/x-Tools/xtools/issues?state=open GitHub] |
|||
The JavaScript-code can be inspected here: |
|||
*[[User:Hedonil/XTools/XTools.js]] |
|||
=== More information === |
|||
* Wikimedia OAuth: [[:mw:Help:OAuth|Help:OAuth]] |
Latest revision as of 19:00, 21 August 2018
![]() | This page can be found at mw:XTools#ArticleInfo gadget.
This is an interwiki redirect. |