GitHub Search Autocomplete

A userscript that adds autocomplete search filters to GitHub

当前为 2017-04-14 提交的版本,查看 最新版本

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