Greasy Fork

Greasy Fork is available in English.

Searx - Number Results

Number search results on select Searx instances.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Searx - Number Results
// @namespace   r-a-y/searx/search
// @description Number search results on select Searx instances.
// @version     1.0.5
// @grant       none
// @match       https://searx.be/*
// @match       https://search.tuxcloud.net/*
// @match       https://searx.hlfh.space/*
// @match       https://search.stinpriza.org/*
// @match       https://searx.win/*
// @match       https://search.snopyta.org/*
// @match       https://searx.prvcy.eu/*
// @license     GPL v3
// ==/UserScript==

var currPage = document.querySelector( '.pull-left input[name="pageno"]' ).getAttribute('value'),
    results = document.getElementById("main_results").getElementsByTagName("h4"),
    searxVersion = document.querySelector( 'meta[name="generator"]' ).getAttribute( 'content' ).replace( 'searx/', '' );

currPage = currPage - 1;

for ( i = 0, len = results.length; i < len; ++i ) {
  newSpan    = document.createElement( "span" );
  newSpan.setAttribute( "style", "float:left; font-weight:600; font-size:.9em !important; display:inline-block; margin-top:2px; margin-right:5px;" );

  newContent = document.createTextNode( ( currPage * len + i + 1 ) + ". ");
  newSpan.appendChild( newContent );

  results[i].insertBefore( newSpan, results[i].firstChild );
}