npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

opensug

v1.0.1

Published

Simply reference a section of openSug.js to get a search box with "search box prompts" to make your search easier!

Downloads

24

Readme

openSug.js

Simply reference a section of openSug.js to get a search box with "search box prompts" to make your search easier! Please browse the configuration page and examples : here

Browser support: IE6+, Firefox, Chrome, Safari, Opera, Edge...

Provide the replacement result source, The default is to use Baidu result source.

Example

Simple

input type: only text or search.

action: baiduSug = 1 or true : Automatic submission, baiduSug = 2 or false : Manual submission.

// [search]Baidu.com
<input type="text" baiduSug="1|true" ... 
<input type="text" baiduSug="2|false" ... 

// [search]Google.com
<input type="text" google="1|true" ... 
<input type="text" google="2|false" ... 

// [search]So.com
<input type="text" haoso="1|true" ... 
<input type="text" haoso="2|false" ... 

// [music]Kugou.com
<input type="text" kugou="1|true" ... 
<input type="text" kugou="2|false" ... 

// [search]Yahoo.com
<input type="text" yahoo="1|true" ... 
<input type="text" yahoo="2|false" ... 

// [search]Yandex.ru
<input type="text" yandex="1|true" ... 
<input type="text" yandex="2|false" ... 

// [video]Youku.com
<input type="text" youku="1|true" ... 
<input type="text" youku="2|false" ... 

// [shopping]Taobao.com
<input type="text" taobao="1|true" ... 
<input type="text" taobao="2|false" ... 

// [video]MGTV.com
<input type="text" mgtv="1|true" ... 
<input type="text" mgtv="2|false" ... 

// [search]SM.cn
<input type="text" sm="1|true" ... 
<input type="text" sm="2|false" ... 

// [topic]Weibo.com
<input type="text" weibo="1|true" ... 
<input type="text" weibo="2|false" ... 

// [search]Rambler.ru
<input type="text" rambler="1|true" ... 
<input type="text" rambler="2|false" ... 

// [eBook]Zongheng.com
<input type="text" book="1|true" ... 
<input type="text" book="2|false" ... 

// [Software]QQ.com
<input type="text" soft="1|true" ... 
<input type="text" soft="2|false" ... 

// [search]Naver.com
<input type="text" naver="1|true" ... 
<input type="text" naver="2|false" ... 

// [Car]Pcauto.com.cn
<input type="text" weixin="1|true" ... 
<input type="text" weixin="2|false" ... 

Advanced

(typeof(BaiduSuggestion)=="object"&&BaiduSuggestion instanceof Object)&&BaiduSuggestion.bind("inputObj", {  // Input ID
      "XOffset": "-4",             // Proposal frame position X offset, unit px.
      "YOffset": "-5",             // Prompt box position vertical Y offset, unit px.
      "width": "",                  // Prompt box width, unit px.
      "fontColor": "#FF0000",       // Prompt text color.
      "fontColorHI": "#0000FF",     // Prompt box highlight text color when selected.
      "fontSize": "14px",           // font size
      "fontFamily": "Microsoft YaHei",    // Text fontFamily.
      "borderColor": "#008000",     // Prompt box border color.
      "bgcolorHI": "#FF6600",       // Prompt box highlights the selected color.
      "sugSubmit": true,             // Whether to submit the form when the entry in the prompt box is selected.
      "source":"google | haoso | kugou | yahoo | yandex | youku | taobao | mgtv | sm | weibo | naver | rambler | book | soft | car | [customize]" // customize = https://{URL}/?{query}=, Default Baidu.
  }, function(Callback){console.log('eg:https://{YouURL}/?conut_update='+ Callback);});

Note: Introduce Javascript files in web pages. Javascript code should be added as far as possible behind the tag in the web page.

Note: If the source page is encoded in UTF-8, be sure to set the charset="gbk" attribute in the script tag, otherwise the search hint will be garbled.

openSug.js xrea.com sug.js.org opensug.evai.pl