GitHub Search Autocomplete

A userscript that adds autocomplete search filters to GitHub

当前为 2017-03-31 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name GitHub Search Autocomplete
  3. // @version 0.1.0
  4. // @description A userscript that adds autocomplete search filters to GitHub
  5. // @license https://opensource.org/licenses/MIT
  6. // @namespace https://github.com/Mottie
  7. // @include https://github.com/*
  8. // @include https://gist.github.com/*
  9. // @run-at document-idle
  10. // @grant GM_addStyle
  11. // @author Rob Garrison
  12. // @require https://code.jquery.com/jquery-3.1.1.min.js
  13. // @require https://cdnjs.cloudflare.com/ajax/libs/Caret.js/0.3.1/jquery.caret.min.js
  14. // @require https://cdnjs.cloudflare.com/ajax/libs/at.js/1.5.3/js/jquery.atwho.min.js
  15. // ==/UserScript==
  16. (($) => {
  17. "use strict";
  18.  
  19. const data = {},
  20. // update examples using current & previous year
  21. year = new Date().getFullYear(),
  22. /**
  23. * This data was manually extracted from the pages listed on
  24. * https://help.github.com/categories/search/
  25. */
  26. filters = {
  27. "AND": {
  28. "": "search operator (max 5 of any operator)"
  29. },
  30. // Issue
  31. "assignee": {
  32. "": "search for issues assigned to the named user",
  33. "fred": 'search for issues assigned to "@fred"'
  34. },
  35. // Commits & Issues
  36. "author": {
  37. "": "search for issues or commits authored by the username",
  38. "fred": 'search for issues or commits authored by "@fred"'
  39. },
  40. "author-date": {
  41. "": "search commits authored before or after a date",
  42. ">${year-1}-12-31": "search commits authored since ${year}",
  43. ">=${year}-01-01": "search commits authored since ${year}",
  44. "<${year}-01-01": "search commits authored before ${year}",
  45. "<=${year-1}-12-31": "search commits authored before ${year}"
  46. },
  47. "author-email": {
  48. "": "search for a commit authored by the specified user email",
  49. "fred@gmail.com": "search for commits authored by gmail fred"
  50. },
  51. "author-name": {
  52. "": "search for a commit created using the author's actual name",
  53. "smith": 'search for commits authored by someone named "smith"'
  54. },
  55. // Issues
  56. "base": {
  57. "": "search pull requests to be merged into the specified branch name",
  58. "gh-pages": 'search pull requests being merged into the "gh-pages" branch'
  59. },
  60. // Issues
  61. "closed": {
  62. "": "search issues & pull requests closed before or after a date",
  63. ">${year-1}-12-31": "search issues & pull requests closed since ${year}",
  64. ">=${year}-01-01": "search issues & pull requests closed since ${year}",
  65. "<${year}-01-01": "search issues & pull requests closed before ${year}",
  66. "<=${year-1}-12-31": "search issues & pull requests closed before ${year}"
  67. },
  68. "commenter": {
  69. "": "search for comments authored by the named user",
  70. "fred": 'search for comments authored by "@fred"'
  71. },
  72. "comments": {
  73. "": "search issues with specified number of comments",
  74. "100": "search issues with exactly 100 comments",
  75. ">100": "search issues with >100 comments",
  76. ">=100": "search issues with >=100 comments",
  77. "10..20": "search issues with 10-20 comments",
  78. "<100": "search issues with <100 comments",
  79. "<=100": "search issues with <=100 comments"
  80. },
  81. "committer": {
  82. "": "search for commits authored by the named user",
  83. "fred": 'search for commits authored by "@fred"'
  84. },
  85. "committer-date": {
  86. "": "search commits authored before or after a date",
  87. ">${year-1}-12-31": "search commits authored since ${year}",
  88. ">=${year}-01-01": "search commits authored since ${year}",
  89. "<${year}-01-01": "search commits authored before ${year}",
  90. "<=${year-1}-12-31": "search commits authored before ${year}"
  91. },
  92. "committer-email": {
  93. "": "search for a commit authored by the specified user email",
  94. "fred@gmail.com": "search for commits authored by gmail fred"
  95. },
  96. "committer-name": {
  97. "": "search for a commit created using the author's actual name",
  98. "smith": 'search for commits authored by someone named "smith"'
  99. },
  100. // Issues & user
  101. "created": {
  102. "": "search issues & user accounts created at the specified date",
  103. ">${year-1}-12-31": "search issues & user accounts created since ${year}",
  104. ">=${year}-01-01": "search issues & user accounts created since ${year}",
  105. "${year}-01-01..*": "search issues & user accounts created since ${year}",
  106. "${year}-01-01..${year}-01-31": "search commits authored in Jan ${year}",
  107. "<${year}-01-01": "search issues & user accounts created before ${year}",
  108. "<=${year-1}-12-31": "search issues & user accounts created before ${year}",
  109. "*..${year-1}-12-31": "search issues & user accounts created before ${year}"
  110. },
  111. // Code
  112. "extension": {
  113. "": "search within file extensions",
  114. "js": "search within JavaScript files",
  115. "rb": "search within Ruby files",
  116. "css": "search within CSS files",
  117. "coffee": "search within CoffeeScript files",
  118. "md": "search within markdown files"
  119. },
  120. "-extension": {
  121. "": "search excludes this file extension",
  122. "js": "search excludes JavaScript files",
  123. "rb": "search excludes Ruby files",
  124. "css": "search excludes CSS files",
  125. "coffee": "search excludes CoffeeScript files",
  126. "md": "search excludes markdown files"
  127. },
  128. // Code
  129. "filename": {
  130. "": "search within code files named as specified",
  131. "test_helper": 'search within the "test_helper" code file(s)',
  132. ".vimrc": 'search "*.vimfc*" code files named as specified'
  133. },
  134. // User
  135. "followers": {
  136. "": "search users & organizations with the specified number of followers",
  137. "100": "search users with exactly 100 followers",
  138. ">100": "search users with >100 followers",
  139. ">=100": "search users with >=100 followers",
  140. "10..20": "search users with 10-20 followers",
  141. "<100": "search users with <100 followers",
  142. "<=100": "search users with <=100 followers"
  143. },
  144. // Code... includes "-fork"?
  145. "fork": {
  146. "": "searches exclude forks when this filter is undefined",
  147. "only": "search only within forked repos",
  148. "true": "search includes forked repos"
  149. },
  150. // Repos, Code
  151. "forks": {
  152. "": "search repos with greater, less, or a range of forks",
  153. "100": "search repos with exactly 100 forks",
  154. ">100": "search repos with >100 forks",
  155. ">=100": "search repos with >=100 forks",
  156. "10..20": "search repos with 10-20 forks",
  157. "<100": "search repos with <100 forks",
  158. "<=100": "search repos with <=100 forks"
  159. },
  160. "-forks": {
  161. "": "search repos outside of the selected number of forks",
  162. "100": "search repos with that do not have exactly 100 forks",
  163. ">100": "search repos with <=100 forks",
  164. ">=100": "search repos with <100 forks",
  165. "10..20": "search repos with <10 or >20 forks",
  166. "<100": "search repos with >=100 forks",
  167. "<=100": "search repos with >100 forks"
  168. },
  169. "fullname": {
  170. "": "search within a user's full name",
  171. "linus": 'search for users with "linus" in their full name',
  172. '"Linus Torvalds"': "search for a full name wrapped in quotes"
  173. },
  174. // Commits
  175. "hash": {
  176. "": "search commits with the specified SHA-1 hash",
  177. "124a9a0ee1d8f1e15e833aff432fbb3b02632105": "search matching hash"
  178. },
  179. // Issues
  180. "head": {
  181. "": "search pull requests opened from the specified branch name",
  182. "fix": 'search pull requests opened from branch names containing the word "fix"'
  183. },
  184. // Repos, Issue, User
  185. "in": {
  186. "": "search within repo, issue or user meta data",
  187. // Repo
  188. "body": "search within an issue or wiki body",
  189. "description": "search within the repo description",
  190. "file": "search within the repo file contents",
  191. "file,path": "search within the repo file contents & path name",
  192. "name": "searh within a user, organization or repo name",
  193. "name,description" : "search within the repo name or description",
  194. "path": "search within the repo path name",
  195. "readme": "search within the repo readme",
  196. // Issue & Wiki
  197. "comments": "search within an issue comments",
  198. "title": "search within an issue or wiki title",
  199. "title,body": "search within an issue or wiki title & body",
  200. // User
  201. "email": "search within a user or organization email (not the domain name)",
  202. "login": "search within a user or organization username",
  203. "fullname": "search within a user's full name"
  204. },
  205. "involves": {
  206. "": "search for issues or commits that involves the named user",
  207. "fred": 'search for issues or commits that involve "@fred"'
  208. },
  209. // Commits
  210. "is": {
  211. "": "search commits and issues of the specified state (multiple allowed)",
  212. "public": "search public commits & issues",
  213. "private": "search private commits & issues",
  214. "open": "search open issues & pull requests",
  215. "closed": "search closed issues & pull requests",
  216. "issue": "search within issues",
  217. "pr": "search within pull requests",
  218. "merged": "search merged pull requests",
  219. "unmerged": "search unmerged pull requests"
  220. },
  221. // Issue
  222. "label": {
  223. "": "search issues & pull requests with the specified label (multiple allowed)",
  224. "bug": 'search for issues & pull requests labeled "bug"',
  225. '"in progress"': "search for multiword labels inside quotes"
  226. },
  227. "-label": {
  228. "": "search issues & pull requests without the specified label",
  229. "bug": 'search for issues & pull requests not labeled "bug"'
  230. },
  231. // Code, Issue, Repos, User
  232. "language": {
  233. "": "search within this language",
  234. "javascript": "search within repos containing JavaScript",
  235. "php": "search within repos containing PHP",
  236. "scss": "search within repos containing SCSS",
  237. "c#": "search within repos containing C#",
  238. "markdown": "search within repos containing markdown (.md, .markdown, etc)",
  239. },
  240. "-language": {
  241. "": "search excludes this language",
  242. "javascript": "search excludes repos with JavaScript",
  243. "php": "search excludes repos with PHP",
  244. "scss": "search excludes repos with SCSS",
  245. "xml": "search excludes repos with XML",
  246. "markdown": "search excludes repos with markdown (.md, .markdown, etc)",
  247. },
  248. "location": {
  249. "": "search users within a location",
  250. '"San Francisco, CA"': "search users in San Francisco",
  251. "london": "search users in london",
  252. "iceland": "search users in Iceland"
  253. },
  254. "-location": {
  255. "": "search users not in a specific location",
  256. '"San Francisco, CA"': "search users not in San Francisco",
  257. "london": "search users not in london",
  258. "iceland": "search users not in Iceland"
  259. },
  260. // Issues
  261. "mentions": {
  262. "": "search for issues mentioning the named user",
  263. "fred": 'search for issues that mention "@fred"'
  264. },
  265. // Commits
  266. "merge": {
  267. "true": "searches that match merge commits",
  268. "false": "searches that match non-merge commits"
  269. },
  270. "merged": {
  271. "": "search pull requests merged at the specified date",
  272. ">${year-1}-12-31": "search pull requests merged since ${year}",
  273. ">=${year}-01-01": "search pull requests merged since ${year}",
  274. "<${year}-01-01": "search pull requests merged before ${year}",
  275. "<=${year-1}-12-31": "search pull requests merged before ${year}"
  276. },
  277. "milestone": {
  278. "": "search for issues & pull requests within the specified milestone",
  279. "sprint-42": 'search for issues & pull requests in the "sprint-42" milestone'
  280. },
  281. "no": {
  282. "": "search issues & pull requests missing the specified association",
  283. "label": "search issues & pull requests that don't have a label",
  284. "assignee": "search issues & pull requests that don't have an assignee",
  285. "milestone": "search issues & pull requests that don't have a milestone",
  286. "project": "search issues & pull requests that don't have a project"
  287. },
  288. "NOT": {
  289. "": "search operator (max 5 of any operator)"
  290. },
  291. "OR": {
  292. "": "search operator (max 5 of any operator)"
  293. },
  294. "org": {
  295. "": "search within the named organization",
  296. "github": "search GitHub's repositories"
  297. },
  298. // Commits
  299. "parent": {
  300. "": "search children of specified SHA-1 hash",
  301. "124a9a0ee1d8f1e15e833aff432fbb3b02632105": "search children of hash"
  302. },
  303. "path": {
  304. "": "search code within the specific file path (directory)",
  305. "cgi-bin": 'search code within the "cgi-bin" folder'
  306. },
  307. "project": {
  308. "": "search issues within a specified repository project board",
  309. "github/linguist/1": "search issues in GitHub's linguist repo project board 1"
  310. },
  311. // Repos
  312. "pushed": {
  313. "": "search repo pushes before or after a date (no range)",
  314. ">${year}-01-15": "search repos pushed to after Jan 15, ${year}",
  315. ">=${year}-01-15": "search repos pushed to since Jan 15, ${year}",
  316. "<${year}-02-01": "pushed to before Feb ${year}",
  317. "<=${year}-02-01": "pushed to before and including Feb 1, ${year}"
  318. },
  319. "-pushed": {
  320. "": "search pushes opposite of selected dates (no range)",
  321. ">${year}-01-15": "search repos pushed to after Jan 15, ${year}",
  322. ">=${year}-01-15": "search repos pushed to since Jan 15, ${year}",
  323. "<${year}-02-01": "pushed to before Feb ${year}",
  324. "<=${year}-02-01": "pushed to before and including Feb 1, ${year}"
  325. },
  326. // Commits
  327. "repo": {
  328. "": "search within the specified user's repository",
  329. "torvalds/linux": "search commits within Linus' Linux repository"
  330. },
  331. "repos": {
  332. "": "search user or organization with specified number of repos",
  333. "100": "search user or org with exactly 100 repos",
  334. ">100": "search user or org with >100 repos",
  335. ">=100": "search user or org with >=100 repos",
  336. "10..20": "search user or org with 10-20 repos",
  337. "<100": "search user or org with <100 repos",
  338. "<=100": "search user or org with <=100 repos"
  339. },
  340. "review": {
  341. "": "search pull requests with the specified review state",
  342. "none": "search pull requests that have not been reviewed",
  343. "required": "search pull requests that require a review before merge",
  344. "approved": "search pull requests that have been approved",
  345. "changes_requested": "search pull requests where a reviewer requested changes"
  346. },
  347. "review-requested": {
  348. "": "search pull requests with a requested reviewer, but only before they review the PR",
  349. "fred": 'search pull requests where "@fred" was asked to review'
  350. },
  351. "reviewed-by": {
  352. "": "search pull requests that have been reviewed by the specified user",
  353. "fred": 'search pull requests reviewed by "@fred"'
  354. },
  355. // Repos, Code - include "-size"?
  356. "size": {
  357. "": "search repos or files with a specific size (in KB)",
  358. "1000": "search repos or files that are exactly 1 MB in size",
  359. ">10000": "search repos or files that are more than 10 MB in size",
  360. ">=10000": "search repos or files that are at least 10 MB in size",
  361. "1024..4096": "search repos or files between 1024 and 4096 KB in size",
  362. "<1000": "search repos or files less than 1 MB in size",
  363. "<=100": "search repos or files that are less than or equal to 100 KB in size"
  364. },
  365. "sort": {
  366. "": 'apply an ascending or descending sort to the specified filter; add "-asc" or "-desc"',
  367. "author-date-asc": "sort oldest authored date first",
  368. "author-date-desc": "sort newest authored date first",
  369. "comments-asc": "sort least comments fist",
  370. "comments-desc": "sort most comments first",
  371. "committer-date-asc": "sort oldest committer date first",
  372. "committer-date-desc": "sort newest committer date first",
  373. "created-asc": "sort oldest item first",
  374. "created-desc": "sort newest item first",
  375. "forks-asc": "sort least forks first",
  376. "forks-desc": "sort most forks first",
  377. "reactions-+1-asc": "sort least +1 reactions first",
  378. "reactions-+1-desc": "sort most +1 reactions first",
  379. "reactions--1-asc": "sort least -1 reactions first",
  380. "reactions--1-desc": "sort most -1 reactions first",
  381. "reactions-heart-asc": "sort least heart reactions first",
  382. "reactions-heart-desc": "sort most heart reactions first",
  383. "reactions-smile-asc": "sort least smile reactions first",
  384. "reactions-smile-desc": "sort most smile reactions first",
  385. "reactions-tada-asc": "sort least tada reactions first",
  386. "reactions-tada-desc": "sort most tada reactions first",
  387. "reactions-thinking_face-asc": "sort least thinking face reactions first",
  388. "reactions-thinking_face-desc": "sort most thinking face reactions first",
  389. "stars-asc": "sort least stars first",
  390. "stars-desc": "sort most stars first",
  391. "updated-asc": "sort least recently updated first",
  392. "updated-desc": "sort recently updated first"
  393. },
  394. "stars": {
  395. "": "search repos with greater, less, or a range of stars",
  396. "100": "search repos with exactly 100 stars",
  397. ">100": "search repos with >100 stars",
  398. ">=100": "search repos with >=100 stars",
  399. "10..20": "search repos with 10-20 stars",
  400. "<100": "search repos with <100 stars",
  401. "<=100": "search repos with <=100 stars"
  402. },
  403. "-stars": {
  404. "": "search repos outside of the selected number of stars",
  405. "100": "search repos with that do not have exactly 100 stars",
  406. ">100": "search repos with <=100 stars",
  407. ">=100": "search repos with <100 stars",
  408. "10..20": "search repos with <10 or >20 stars",
  409. "<100": "search repos with >=100 stars",
  410. "<=100": "search repos with >100 stars"
  411. },
  412. "state": {
  413. "closed": "search closed issues",
  414. "open": "search open issues"
  415. },
  416. "status": {
  417. "": "search pull requests with the specified status",
  418. "success": "search pull requests with a successful status",
  419. "pending": "search pull requests with a pending status",
  420. "failed": "search pull requests with a failed status"
  421. },
  422. "team": {
  423. "": "search issues or pull requests mentioning an organization team",
  424. "jekyll/owners": 'search issues or pull requests for team "@jekyll/owners"',
  425. "myorg/ops": 'search issues or pull requests for team "@myorg/ops"'
  426. },
  427. "topic": {
  428. "": "search repos with the specified topic",
  429. "jekyll": 'search for repos classified with a "jekyll" topic'
  430. },
  431. "topics": {
  432. "": "search repos with greater, less, or a range of topics",
  433. "3": "search repos with exactly 3 topics",
  434. ">3": "search repos with more than three topics",
  435. ">=3": "search repos with three or more topics",
  436. "<3": "search repos with less than 3 topics",
  437. "<=2": "search repos with zero to two topics"
  438. },
  439. // Commits
  440. "tree": {
  441. "": "searches commits referring to the specified tree hash",
  442. "99ca967": "search commits of tree hash"
  443. },
  444. "type": {
  445. "": "search for a user, organization, issue or pull request",
  446. "issue": "only search issues",
  447. "pr": "only search pull requests",
  448. "org": "only search organizations",
  449. "user": "only search personal accounts"
  450. },
  451. // Wiki
  452. "updated": {
  453. "": "search issue & wiki updates before or after a date (no range)",
  454. ">${year}-01-31": "search repos pushed to after Jan 31, ${year}",
  455. ">=${year}-01-31": "search repos pushed to since Jan 31, ${year}",
  456. "<${year}-02-01": "pushed to before Feb ${year}",
  457. "<=${year}-02-01": "pushed to before and including Feb 1, ${year}"
  458. },
  459. // User
  460. "user": {
  461. "": "search for a specific user or organization",
  462. "github": "search in github organization repos"
  463. },
  464. "-user": {
  465. "": "search excludes a specific user or organization",
  466. "github": "search does not include github organization repos"
  467. }
  468. },
  469. list = Object.keys(filters);
  470.  
  471. function updateYear(string) {
  472. return string.replace(/(\$\{year(-1)?\})/g, function(str) {
  473. return {
  474. "${year}": year,
  475. "${year-1}": year - 1
  476. }[str];
  477. });
  478. }
  479.  
  480. // copied from atwho.js DEFAULT_CALLBACKS.highlighter
  481. // https://github.com/ichord/At.js/blob/master/dist/js/jquery.atwho.js#L105
  482. // to add a class to the <strong> html
  483. function highlighter(li, query) {
  484. if (!query) {
  485. return li;
  486. }
  487. const regexp = new RegExp(
  488. ">\\s*([^\<]*?)(" + query.replace("+", "\\+") + ")([^\<]*)\\s*<", 'ig'
  489. );
  490. return li.replace(regexp, function(str, $1, $2, $3) {
  491. return `>${$1}<strong class="text-emphasized">${$2}</strong>${$3} <`;
  492. });
  493. }
  494.  
  495. function escapeHTML(string) {
  496. return updateYear(string).replace(/[<>"&]/g, function(str) {
  497. return {
  498. "<" : "&lt;",
  499. ">" : "&gt;",
  500. '"' : "&quot;",
  501. "&" : "&amp;"
  502. }[str];
  503. });
  504. }
  505.  
  506. function addAtJs(selectors) {
  507. initialized = true;
  508. // add "?" to open list of filters
  509. $(selectors).atwho({
  510. at: "?",
  511. data: list,
  512. insertTpl: "${name}:",
  513. // show everything in dropdown
  514. limit: list.length,
  515. suffix: "",
  516. callbacks: {
  517. highlighter: highlighter
  518. }
  519. });
  520.  
  521. // Add specific filter examples
  522. list.forEach(label => {
  523. $(selectors).atwho({
  524. at: label + ":",
  525. data: data[label],
  526. limit: 20,
  527. startWithSpace: false,
  528. callbacks: {
  529. highlighter: highlighter,
  530. tplEval: function(tpl, map) {
  531. // look for default displayTpl = "<li>${name}</li>"
  532. if (tpl.indexOf("<li>") > -1) {
  533. // menu template; text-emphasized needed for GitHub-Dark userstyle
  534. return `
  535. <li>
  536. <strong class="ghsa-key text-emphasized">
  537. ${escapeHTML(map.name)}
  538. </strong>
  539. <small>${escapeHTML(map.description)}</small>
  540. </li>`;
  541. }
  542. // insert text template
  543. return `${map["atwho-at"]}${updateYear(map.name)}`;
  544. },
  545. sorter: function(query, items) {
  546. // reset suffix setting
  547. this.setting.suffix = " ";
  548. return items;
  549. },
  550. beforeInsert: function(value, $li) {
  551. // don't add a space if the user chooses an empty string value
  552. // meaning the filter ends with a colon, e.g. "in:"
  553. this.setting.suffix = value.slice(-1) === ":" ? "" : " ";
  554. console.log(`"${value}"`, `"${this.setting.suffix}"` );
  555. return value;
  556. }
  557. }
  558. });
  559. });
  560. // use classes from GitHub-Dark to make theme match GitHub-Dark
  561. document.querySelectorAll(".atwho-view").forEach(el => {
  562. el.classList.add(...["popover", "suggester"]);
  563. });
  564. }
  565.  
  566. // prevent reinitializing if user clicks in the input multiple times
  567. let initialized = false;
  568. function init() {
  569. // search input classes used by GitHub
  570. const selectors = [
  571. ".header-search-input", // main header search
  572. "[aria-label*='Search']", // https://github.com/search
  573. ".search-page-input", // https://github.com/search/advanced
  574. "#js-issues-search" // https://github.com/:user/:repo/issues & pulls
  575. ].join(",");
  576.  
  577. // build data for At.js
  578. let array;
  579. list.forEach(label => {
  580. array = [];
  581. Object.keys(filters[label]).forEach(key => {
  582. array.push({
  583. "name": key,
  584. "description": filters[label][key]
  585. });
  586. });
  587. // sort empty string to top
  588. data[label] = array.sort((a, b) => {
  589. if (a.name === "") {
  590. return -1;
  591. }
  592. return a.name > b.name ? 1 : -1;
  593. });
  594. });
  595.  
  596. document.querySelector("body").addEventListener("click", event => {
  597. const target = event.target;
  598. if (
  599. !initialized &&
  600. target.nodeName === "INPUT" &&
  601. target.matches(selectors)
  602. ) {
  603. $(selectors).atwho("destroy");
  604. addAtJs(selectors);
  605. }
  606. });
  607. // remove At.js before the page refreshes
  608. document.querySelector("body").addEventListener("pjax:start", event => {
  609. const target = event.target;
  610. if (target.nodeName === "INPUT" && target.matches(selectors)) {
  611. $(selectors).atwho("destroy");
  612. initialized = false;
  613. }
  614. });
  615. }
  616.  
  617. GM_addStyle(`
  618. .atwho-view { position:absolute; top:0; left:0; display:none;
  619. margin-top:18px; border:1px solid #ddd; border-radius:3px;
  620. box-shadow:0 0 5px rgba(0,0,0,0.1); max-height:225px; min-width:300px;
  621. max-width:none !important; overflow: auto; z-index: 11110 !important; }
  622. .atwho-view .cur { background:#36F; color:#fff; }
  623. .atwho-view .cur small { color:#fff; }
  624. .atwho-view strong { color:#36F; }
  625. .atwho-view .cur strong { color:#fff; font:bold; }
  626. .atwho-view ul { list-style:none; padding:0; margin:auto; max-height: 200px;
  627. overflow-y:auto; }
  628. .atwho-view ul li { display:block; padding:5px 10px;
  629. border-bottom: 1px solid #ddd; cursor:pointer; text-align:right; }
  630. .atwho-view small { font-size:smaller; color:#777; font-weight:normal; }
  631. .atwho-view .ghsa-key { font-style:normal; float:left; margin-right:10px;
  632. color:#111; }`
  633. );
  634.  
  635. init();
  636.  
  637. })(jQuery.noConflict(true));