User:JAAqqO/EnhancedSearchPage

EnhancedSearchPage (source) is a script that adds useful features to the search page Special:Search. Most importantly, it adds buttons to copy the search results to the clipboard.

Installation
You can use script-installer to install this script. If you don't have script-installer installed yet:


 * 1) In your preferences, go to.
 * 2) At the bottom of the "Advanced" section, click the "" checkbox, then click the "Save" button.
 * 3) Then, on this page, click the blue "Install" button in the infobox to the right (refresh this page if you can't see the button).
 * 4) And now the script should work:.

Alternatively, you can also just add the following line:



to Special:MyPage/common.js

If the "The document contains errors. Are you sure you want to publish?" warning appears when trying to save the page, just click "OK".

And now the script should work:.

''It is possible to install this script in other wikis too. Also, it's possible to use it without having to be logged in. See this section for instructions.''

What it does
I.e. https://petscan.wmflabs.org/?active_tab=tab_other_sources&manual_list=Article%0AArticle%202%0AArticle%203&manual_list_wiki=enwiki&project=wikipedia&language=en&doit= I.e. https://petscan.wmflabs.org/?active_tab=tab_other_sources&ns%5B0%5D=1&search_query=Article&search_wiki=enwiki&search_max_results=10000&project=wikipedia&language=en&doit=
 * 1. Adds "Show 5000 results" into the two "Show x results" menus
 * 2. Adds a shortened results list and four copy buttons to quickly copy the results to the clipboard (either plain text, wikitext or PetScan links):
 * 2.1. "Copy plain text" results in:
 * These plain text results are compatible with useful tools like AutoWikiBrowser (AWB) and PetScan. For example, you can paste them to:
 * In AWB, right click the empty page list in the bottom left corner and choose "Paste".
 * In PetScan, paste the results to the "Manual list" field in the "Other sources" tab (pre-filled search).
 * 2.2. "Copy wikitext" results in:
 * 2.3. "Copy PetScan (1st)" uses the results shown on the current search page and results in:
 * 2.3. "Copy PetScan (1st)" uses the results shown on the current search page and results in:
 * 2.3. "Copy PetScan (1st)" uses the results shown on the current search page and results in:
 * 2.4. "Copy PetScan (2nd)" uses the search query and results in:
 * 3. Adds buttons to quickly scroll up and down
 * 4. Adds "x results shown on the page" next to the results info
 * 5. Adds (or brings back?) the red color and slightly bigger font for the "No results found for/Did you mean" notification

Contribute
Leave bug reports or feature suggestions on the talk page.

Other wikis
Install this script in other wikis by adding the following line:

to your common.js page in that wiki, i.e. change the XY in the following URL to correspond your wiki:
 * https://XY.wikipedia.org/wiki/Special:MyPage/common.js

Note that the script might not work perfectly in other wikis since this script is tested only on en-wiki and fi-wiki.

Logged out
You don't have to be logged in to use this script: First install the browser extension Tampermonkey, then click the extension's "Create a new script", and then add this code to that new script page:

After you save the script page, the script should work.

Note that you can alter the following line: to use the script in other wikis too, e.g.

Note that the script might not work perfectly in other wikis since this script is tested only on en-wiki and fi-wiki.