Created
April 30, 2024 16:42
-
-
Save jareha/6191f6df5a86d282f474dce904bb24a2 to your computer and use it in GitHub Desktop.
Bookmarklet to search ports on MacPorts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint esversion: 8 */ | |
(function () { | |
const fallback = "https://ports.macports.org/"; | |
const keyword = "%s"; | |
const service = "https://ports.macports.org/search/"; | |
const suffix = "&name=on"; | |
if (keyword !== "" || keyword !== "%" + "s") { | |
window.location = `${service}?q=${keyword}${suffix}`; | |
} else { | |
window.location = fallback || service; | |
} | |
})(); | |
// javascript:(function(){const fallback="https://ports.macports.org/";const keyword="%s";const service="https://ports.macports.org/search/";const suffix="&name=on";if(keyword!==""||keyword!=="%s"){window.location=`${ service }?q=${ keyword }${ suffix }`}else{window.location=fallback||service}})(); | |
// Minified at https://duckduckgo.com/?q=javascript+minifier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment