Kawiesh

Nazar Bookmarklets

Nov 30th, 2020 (edited)
1,232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //--------------------HOTSTAR---------------------------
  2. let a= 'https://www.hotstar.com/in/tv/nazar/18293/',
  3.     b= /\d{6,}/,
  4.     c= document.querySelectorAll('a[href*=all-wish]'),
  5.     d= document.querySelector('#togglehs'),
  6.     x= true,
  7.    bm= [...c].join('\n'),
  8.    cm= bm.split('\n');
  9.  
  10. function kd(){
  11. for(let i=0; i<c.length; i++){
  12. if(x==true){
  13. c[i].href=a+c[i].href.match(b);
  14. x=false;
  15. }
  16. else if(x==false){
  17. c[i].href=cm[i];
  18. x=true;
  19. }
  20. }}
  21.  
  22. d.onclick=kd;
  23.  
  24. //-------------
  25. let a= document.getElementsByTagName('a'),
  26.     b= /.+wish.+\D+/gi,
  27.     c= 'https://www.hotstar.com/in/tv/nazar/18293/';
  28.  
  29. for (let i=0; i<a.length; i++) {
  30. a[i].href = a[i].href.replace('&type=hotstar','');
  31. a[i].href = a[i].href.replace(b,c);
  32. }
  33.  
  34. //--------------  
  35. let a= document.getElementsByTagName('a'),
  36. c= 'https://www.hotstar.com/in/tv/nazar/18293/';
  37.  
  38. for (let i=0; i<a.length; i++) {  
  39. e=a[i].href.includes('all-wish'),
  40. f=!a[i].href.includes('javascript');
  41. if (e&&f){
  42. d= a[i].href.match(/\d{7,}/gi),
  43. a[i].href = c+d;
  44. }
  45. }
  46.  
  47. //----------------Force--Rename-New--Window------------------------
  48. let a= document.querySelectorAll('a');
  49. for(let i=0; i<a.length; i++){
  50. a[i].onclick= function(){
  51. let b= window.open('','_blank');
  52. b.document.title= a[i].textContent;
  53. b.document.body.innerHTML=`<iframe src='${a[i].href'></iframe>`;
  54. return false;
  55. };
  56. }
Add Comment
Please, Sign In to add comment