Advertisement
congdantoancau

Webstore navigation bookmarklet

Oct 15th, 2018
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.05 KB | None | 0 0
  1. // Javascript
  2. $(document).keydown(function(e) {
  3.     if (e.which == 37) {
  4.         $('.i-n-H-k').eq(0).click();
  5.     }
  6.     if (e.which == 39) {
  7.         $('.i-p-H-k').eq(0).click();
  8.     }
  9. });
  10.  
  11. // Bookmarklet (create on https://mrcoles.com/bookmarklet/)
  12. javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3B%24(document).keydown(function(e)%20%7Bif%20(e.which%20%3D%3D%2037)%20%7B%24('.i-n-H-k').eq(0).click()%3B%7Dif%20(e.which%20%3D%3D%2039)%20%7B%24('.i-p-H-k').eq(0).click()%3B%7D%7D)%7D)(jQuery.noConflict(true))%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.11.1%2Fjquery.min.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallback%2Cfalse)%7Delse%20if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()
  13.  
  14. // AutoHotkey
  15. ; Chrome Webstore Navigation
  16. #IfWinActive, Chrome Web Store
  17.     ~F6::
  18.         Sleep 40
  19.         Send wn{enter}
  20.     return
  21.     ~[::
  22.         Send {home}{down 6}
  23.     return
  24.     ~]::
  25.         Send {home}{down 22}
  26.     return
  27. #IfWinActive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement