Greasy Fork

Greasy Fork is available in English.

eBay Auto Sort by Lowest Price

Auto set sort by price on eBay.ie

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @run-at document-start
// @name        eBay Auto Sort by Lowest Price
// @namespace   EBY
// @description Auto set sort by price on eBay.ie
// @version     1.01
// @copyright   2020 Chopper
// @include     https://www.ebay.ie/sch/*
// @grant       none
// ==/UserScript==

// Get current URL
var url = window.location.href;

// If URL contains already contains a sorting method, don't change it.
if (url.indexOf('_sop=1' || '_sop=2' || '_sop=3' || '_sop=7' || '_sop=10'|| '_sop=12' || '_sop=15' || '_sop=16'  || '_sop=18' || '_sop=19' ) > -1){
   url += ''
}

// If there is no sorting method, sort by lowest price
else{
   url += '&_sop=15'
  // Load new URL
window.location.href = url;
}