FileCR Search Fix

A simple script to re-add the original Search feature, instead of Google Search.

目前為 2023-01-28 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        FileCR Search Fix
// @namespace   lemons
// @license     Unlicense
// @match       *://filecr.com/*
// @icon        https://filecr.com/wp-content/uploads/2018/11/favico.png
// @grant       none
// @version     1.1
// @author      lemons
// @description A simple script to re-add the original Search feature, instead of Google Search.
// ==/UserScript==

// readd search
document.querySelector(".nav-bar > .header-logo").outerHTML += `<div class="search-container">
<form class="header--search" method="get" action="https://filecr.com/">
<input type="text" class="header--search-input" id="search-input" value="${new URLSearchParams(location.search).get("s") ?? ""}" placeholder="Search software here..." autocomplete="off" name="s" data-ddg-inputtype="unknown">
<button type="submit" aria-label="search button" class="header--search-submit">
<div class="icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
  <path fill-rule="evenodd" d="M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z" clip-rule="evenodd"></path>
</svg>
</div>
</button>
</form>
</div>`;

// remove google sidebar
document.querySelector(".sidebar").innerHTML = "";