Struggling to get this working even using the instructions here https://www.squarepenguin.co.uk/guid...yer-pvr-guide/
Anybody else use it for radio?
Anybody else use it for radio?
// ==UserScript== // @name radio-lists // @namespace Violentmonkey Scripts // @include *radio-lists.org.uk* // @require [url]http://code.jquery.com/jquery-latest.min.js[/url] // @version 1 // @grant none // ==/UserScript== $( document ).ready( function() { var long_str = "&SEARCHFIELDS=pid&PROGTYPES=radio&EXCLUDE=&CATEGORY=&EXCLUDECATEGORY=&CHANNEL=&EXCLUDECHANNEL=&SINCE=&BEFORE=&FUTURE=1&SORT=index&REVERSE=0&PAGESIZE=10&HIDE=0&HIDEDELETED=0&COLS=type&COLS=name&COLS=episode&COLS=desc&COLS=channel&COLS=timeadded&OUTPUT=&VERSIONLIST=&MODES=&PROXY=&SUBTITLES=0&METADATA=&THUMB=0&PVRHOLDOFF=&FORCE=0&AUTOWEBREFRESH=1&AUTOPVRRUN=4&REFRESHFUTURE=0&BITRATE=&VSIZE=&VFR=&STREAMTYPE=&SAVE=0&SEARCHTAB=yes&COLUMNSTAB=no&DISPLAYTAB=no&RECORDINGTAB=no&STREAMINGTAB=no&PAGENO=1&INFO=0&NEXTPAGE=pvr_queue&ACTION=&.cgifields=FORCE&.cgifields=REVERSE&.cgifields=FUTURE&.cgifields=HISTORY&.cgifields=HIDE&.cgifields=PROGTYPES&.cgifields=REFRESHFUTURE&.cgifields=THUMB&.cgifields=HIDEDELETED&.cgifields=COLS&.cgifields=SUBTITLES" //console.log("hello:"+long_str) $('a[href^="https://www.bbc.co.uk/programmes/"][target="_blank"]').each( function(){ var href = $(this).attr('href') console.log("href:"+href) var myArr = href.split('/') var pid = myArr[myArr.length-1] var ddd = $(this).parent('b').prev('i').text().trim(); var str = $(this).parent('b').text().trim(); var url = "http://localhost:1935/?SEARCH=" + encodeURIComponent( "radio|" + pid + "|<"+ ddd + " " + str +">") + long_str $(this).before(' <a target="pvr" href="'+ url +'">⏺</a>') $(this).before(' <a target="credit" href="'+ href +'/credits.inc">C</a>') $(this).before(' <a target="credit" href="'+ href +'/broadcasts.inc">B</a> ') $(this).attr('href', href+'#programmes-content') }) // tidy up[ the end bit $('a[name=pind]').nextAll().remove(); var node=$('a[name=pind]')[0] while( node.nextSibling.nodeType == Node.TEXT_NODE ) node.nextSibling.remove(); })
// ==UserScript== // @name radio-lists // @namespace Violentmonkey Scripts // @include *radio-lists.org.uk* // @require [url]http://code.jquery.com/jquery-latest.min.js[/url] // @version 1 // @grant none // ==/UserScript== $( document ).ready( function() { var long_str = "&SEARCHFIELDS=pid&PROGTYPES=radio&EXCLUDE=&CATEGORY=&EXCLUDECATEGORY=&CHANNEL=&EXCLUDECHANNEL=&SINCE=&BEFORE=&FUTURE=1&SORT=index&REVERSE=0&PAGESIZE=10&HIDE=0&HIDEDELETED=0&COLS=type&COLS=name&COLS=episode&COLS=desc&COLS=channel&COLS=timeadded&OUTPUT=&VERSIONLIST=&MODES=&PROXY=&SUBTITLES=0&METADATA=&THUMB=0&PVRHOLDOFF=&FORCE=0&AUTOWEBREFRESH=1&AUTOPVRRUN=4&REFRESHFUTURE=0&BITRATE=&VSIZE=&VFR=&STREAMTYPE=&SAVE=0&SEARCHTAB=yes&COLUMNSTAB=no&DISPLAYTAB=no&RECORDINGTAB=no&STREAMINGTAB=no&PAGENO=1&INFO=0&NEXTPAGE=pvr_queue&ACTION=&.cgifields=FORCE&.cgifields=REVERSE&.cgifields=FUTURE&.cgifields=HISTORY&.cgifields=HIDE&.cgifields=PROGTYPES&.cgifields=REFRESHFUTURE&.cgifields=THUMB&.cgifields=HIDEDELETED&.cgifields=COLS&.cgifields=SUBTITLES" //console.log("hello:"+long_str) $('a[href^="https://www.bbc.co.uk/programmes/"][target="_blank"]').each( function(){ var href = $(this).attr('href') console.log("href:"+href) var myArr = href.split('/') var pid = myArr[myArr.length-1] var ddd = $(this).parent('b').prev('i').text().trim(); var str = $(this).parent('b').text().trim(); var url = "http://localhost:1935/?SEARCH=" + encodeURIComponent( "radio|" + pid + "|<"+ ddd + " " + str +">") + long_str $(this).before(' <a target="pvr" href="'+ url +'">⏺</a>') $(this).before(' <a target="credit" href="'+ href +'/credits.inc">C</a>') $(this).before(' <a target="credit" href="'+ href +'/broadcasts.inc">B</a> ') $(this).attr('href', href+'#programmes-content') }) // tidy up[ the end bit $('a[name=pind]').nextAll().remove(); var node=$('a[name=pind]')[0] while( node.nextSibling.nodeType == Node.TEXT_NODE ) node.nextSibling.remove(); })
Comment