File tree Expand file tree Collapse file tree
PluginDirectories/1/gyazo-search.bundle Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Gyazo Search in Spotlight plugin by Flashlight
2+
3+ ![ Screenshot] ( https://i.gyazo.com/9a8ffcd84835c1630088579565fb5150.png )
4+
5+ ## keyword
6+
7+ - ` gyazo <searchword> `
8+ - ` gy <searchword> `
9+
10+ ### :warning : Note about login
11+
12+ if it shows login page in webview, please login to Gyazo.com with your Safari.
Original file line number Diff line number Diff line change 1+ gyazo ~keyword(kyoto)
2+ gy ~keyword(lgtm)
Original file line number Diff line number Diff line change 1+ {
2+ "categories" : [
3+ " Utilities"
4+ ],
5+ "displayName" : " Gyazo Search" ,
6+ "name" : " gyazo-search" ,
7+ "description" : " " ,
8+ "examples" : [
9+ " gyazo kyoto" ,
10+ " gy lgtm"
11+ ]
12+ }
Original file line number Diff line number Diff line change 1+ def results (fields , original_query ):
2+ keyword = fields ['~keyword' ]
3+ html = (
4+ open ("show.html" ).read ().decode ('utf-8' )
5+ .replace ("<!--KEYWORD-->" , keyword )
6+ )
7+ return {
8+ "title" : "Gyazo Seach '{0}'" .format (keyword .encode ('utf-8' )),
9+ "run_args" : [keyword .encode ('utf-8' )],
10+ "html" : html ,
11+ "webview_links_open_in_browser" : True
12+ }
13+
14+ def run (message ):
15+ import os , pipes
16+ os .system ('open "https://gyazo.com/search/{0}"' .format (message .encode ('utf8' )))
Original file line number Diff line number Diff line change 1+ < html >
2+ < head >
3+ </ head >
4+ < body data-keyword ='<!--KEYWORD--> '>
5+ < script >
6+ setTimeout ( function ( ) {
7+ var keyword = document . querySelector ( 'body' ) . getAttribute ( 'data-keyword' )
8+ window . location = 'https://gyazo.com/search/' + keyword
9+ } , 300 )
10+ </ script >
11+ < h1 style ="font-family: sans-serif;margin-bottom: 5px; "> Searching <!--KEYWORD--> </ h1 >
12+ < img style ="width: 80%; margin: auto;margin-top: 0px; " src ="./ninja.png " />
13+ </ body >
14+ </ html >
You can’t perform that action at this time.
0 commit comments