Advertisement
MarkusAO

Foxtel TV Guide Filter (Bookmarklet)

Jul 18th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**      ==== FOXTEL TV GUIDE CHANNEL FILTER ("BOOKMARKLET") ====
  2.  
  3.     Helps you clear the clutter and see a listing of only the channels you watch.
  4.    
  5.     How to use:
  6.    
  7.         1. Add a new bookmark (any page) in your browser. Call it e.g. "FoxFilter".
  8.         2. Edit the new bookmark in the bookmark manager -- or right-click on it.
  9.         3. Paste the code below -- starting with "javascript" -- into its URL field.
  10.         4. Browse to: https://www.foxtel.com.au/got/whats-on/tv-guide/grid/
  11.         5. Click on your "FoxFilter" bookmark -- unwanted channels will be hidden.
  12.        
  13.         6. To modify your channels, edit the channel numbers below  (comma-separated).
  14.            (The default listing includes "Entertainment" and "Sports" channels.)
  15.         7. If you want to see all the channels again, simply refresh the page.
  16. */
  17.  
  18.  
  19.  
  20. javascript:(function(){
  21.  
  22. showChans = [ 100,101,102,103,104,105,106,108,110,111,112,113,124,131,134,139,140,141,142,143,144,149,150,151,152,153,154,155,156,176,177,180,182,183,192,193,194,209,210,428,500,501,502,503,504,505,506,507,508,509,511,512,513,514,515,516,517,518,526,528,529,601,602,603,604,605,606,608,610,640,641,642,644,648,649,650,651,653,654,656,658,703,709,715,723 ];
  23.  
  24. /* ==== ^ Edit Channel Numbers Above ^ ==== */
  25.  
  26.  
  27. function filterChannels(showChans)
  28. {  
  29.     chanList = document.getElementsByClassName('epg-programs-row');
  30.     var i = chanList.length;
  31.  
  32.     while( i-- ) {
  33.         chanCode = chanList[i].dataset.epgChannel;
  34.         chanNum = parseInt(chanList[i].getElementsByClassName('epg-channel-number')[0].innerHTML);
  35.         if (showChans.indexOf(chanNum) !== -1) {
  36.             chanList[i].style.display = 'block';
  37.         } else {
  38.             chanList[i].style.display = 'none';
  39.         }
  40.     }
  41. }
  42.  
  43. filterChannels(showChans);})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement