scripting / Scripting-News

I'm starting to use GitHub for work on my blog. Why not? It's got good communication and collaboration tools. Why not hook it up to a blog?
120 stars 10 forks source link

Radio3 questions #180

Open scripting opened 4 years ago

scripting commented 4 years ago

If you have a question about Radio3 or the Howto doc, please post here.

bph commented 4 years ago

It's pretty complete! Thank you. You might want to add that the content box takes HTML ( not recommended for tweet). I do a two-step process: first post to Twitter and @ mention people in the post. Once that done I edit the post with IMG and links or lists...

scripting commented 4 years ago

@bph -- thanks for the note, I will add that to the howto. If you have any ideas for the product, please post them here. I've now gotten rid of most of the ancient techniques in the code, so I can work on it again. Radio3 is an important part of the toolkit.

bph commented 3 years ago

Is there a way to export all the links? I have about 140 weeks of 3 to 6 links per week. I would like to do some categorization, check if they are still active. As I use the took to create RSS to Email newsletter, I would also like to go through them map them with the click stats from the email provider.

sbwaters commented 3 years ago

In Firefox on the Radio3 Howto page, dragging R3 to the Links toolbar stores this truncated javascript function:

javascript:(function(){function encode (s) {s = s.toString ();s = s.replace (new RegExp (

The Radio3 Howto page sourcecode shows this HTML hyperlink of javascript at the R3 link:

"text": "<a href=\"javascript:(function(){function encode (s) {s = s.toString ();s = s.replace (new RegExp (\" %\",=\"\" \"g\"),=\"\" \"=\"\" percent\");return=\"\" (encodeuricomponent=\"\" (s));}var=\"\" url=\"http://radio3.io/?\" ;var=\"\" link=\"link=\" +=\"\" encode=\"\" (location.href);var=\"\" title=\"&title=\" (document.title);var=\"\" desc=\"&description=\" (document.getselection=\"\" ());=\"\" window.open=\"\" (url=\"\" desc);})=\"\" ()\"=\"\" style=\"font-family: Ubuntu; font-size: 28px; font-weight: bold; line-height: 160%; margin-left: 0em; margin-bottom: 30px;\">R3 ",

If I peel off the HTML this would be the remaining javacript :

javascript:(function(){function encode (s) {s = s.toString ();s = s.replace (new RegExp (\" %\",=\"\" \"g\"),=\"\" \"=\"\" percent\");return=\"\" (encodeuricomponent=\"\" (s));}var=\"\" url=\"http://radio3.io/?\" ;var=\"\" link=\"link=\" +=\"\" encode=\"\" (location.href);var=\"\" title=\"&title=\" (document.title);var=\"\" desc=\"&description=\" (document.getselection=\"\" ());=\"\" window.open=\"\" (url=\"\" desc);})=\"\" ()\"=\"\" style=\"font-family: Ubuntu; font-size: 28px; font-weight: bold; line-height: 160%; margin-left: 0em; margin-bottom: 30px;\"

Then at the R3 link in the Firefox toolbar, I replaced the truncated javascript with the code above.

Using the webpage http://this.how/radio3/ as a sample page, when the link is clicked to execute the stored javascript Firefox console shows this message:

Uncaught SyntaxError: Invalid escape sequence radio3.io 1:78

The complete console shows: This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. radio3 Script error in [Greasemonkey script http://snowplow.org/martin/greasemonkey/killfile]: ReferenceError: GM_registerMenuCommand is not defined killfile:982:19

user-script:http://snowplow.org/martin/greasemonkey/killfile:982 startup code.js:170:10 hitCounter: msgFromServer == "We got your ping on 9/11/2021, 2:59:31 PM" code.js:613:11 readGlossary: read 116 items in 0.373 secs. code.js:83:13 setXmlIcon: urlOpmlFile == http://this.how/radio3/?format=opml code.js:156:10 For clarity, BBEdit shows the javascript as: javascript:(function() {function encode (s) {s = s.toString (); s = s.replace (new RegExp (\" %\",=\"\" \"g\"),=\"\" \"=\"\" percent\"); return=\"\" (encodeuricomponent=\"\" (s));} var=\"\" url=\"http://radio3.io/?\" ; var=\"\" link=\"link=\" +=\"\" encode=\"\" (location.href); var=\"\" title=\"&title=\" (document.title); var=\"\" desc=\"&description=\" (document.getselection=\"\" ());=\"\" window.open=\"\" (url=\"\" desc);})=\"\" ()\"=\"\" style=\"font-family: Ubuntu; font-size: 28px; font-weight: bold; line-height: 160%; margin-left: 0em; margin-bottom: 30px;\" My Javascript, RegExp, and browser internals are not up to deciphering the problem. Thank you for any help. [Note: The Greasemonkey extension is used by another website but when disabled, Clicking the R3 link still generates the same error.]
tmanternach commented 3 years ago

I'm not going to be very helpful here, but I just wanted to say that I found this via Dave's linkblog and I tried this bookmarklet in both Chrome and Safari (both on macOS) and it behaves just like @sbwaters is describing for Firefox. I can't get it to work at all.

sbwaters commented 3 years ago

I also just failed with Safari and Chrome.

tmanternach commented 3 years ago

I tried to use the Wayback Machine to go view an older version of the page to see if the bookmarklet changed, but because the page is (mostly) rendered in Javascript, it looks like Wayback just captured a blank page.

scripting commented 3 years ago

Good -- now we have enough data to start looking into it.

And @sbwaters -- you have all the tools you need to view the source of the this.how page for Radio3, and to see exactly what the bookmarklet script is supposed to be.

I'm going to spend some more time looking but the problem is -- it works for me here.

tmanternach commented 3 years ago

@sbwaters, give this javascript code a go:

javascript:(function(){ function encode (s) { s = s.toString (); s = s.replace (new RegExp (" %", "g")," percent"); return (encodeuricomponent (s)); } var url="http://radio3.io/?" ; var link="link=" + encodeURI(location.href); var title="&title=" + (document.title); var desc="&description=" + (document.getSelection ()); window.open (url+link+title+desc);}) ()

If you right click your R3 bookmarklet in Firefox, you can "Edit Bookmark" and replace the URL portion with that code.

Something really strange happens when you copy/paste the javascript code straight out of the how-to page. It inserts a ton of characters that show up as ="" all over.

scripting commented 3 years ago

@tmanternach -- bookmarklets are a dark art. I don't know anyone who really understands how they work. ;-)

andysylvester commented 3 years ago

@tmanternach I was able to paste the above Javascript into my Firefox R3 bookmarklet, and it brought up the Radio3 page as expected. Before that, I saw an error in the Javascript console, and when I clicked on it, a new tab opened and displayed https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_token and Syntax error: Unexpected token.

andysylvester commented 3 years ago

Just did a test in the Brave browser, saw the same issue as in Firefox. Editing the bookmarklet with the code above worked. I also noticed that I had to have a title in the entry to be able to see the entry in my Linkblog home (http://radio3.io/users/AndySylvester99/).

tmanternach commented 3 years ago

I'm not sure exactly why, but it seems if you flip description and title in the last line, it behaves like it should. Try this code instead:

javascript:(function(){ function encode (s) { s = s.toString (); s = s.replace (new RegExp (" %", "g")," percent"); return (encodeuricomponent (s)); } var url="http://radio3.io/?" ; var link="link=" + encodeURI(location.href); var title="&title=" + (document.title); var desc="&description=" + (document.getSelection ()); window.open (url+link+desc+title);}) ()

am1t commented 3 years ago

Is there a way to reset the Radio3 data? Currently, building LinkBlog Json takes minutes as the console keeps printing 404s trying to fetch history.json from all dates till it hits the whenLinkblogStart in appPrefs. This happens every time a new entry is added.

A sample URL that returns 404 - http://radio3.io/users/_am1t/2021/10/08/history.json

scripting commented 3 years ago

@am1t -- I just made a change, when Radio3 starts up, it checks if appPrefs.whenLinkblogStart is prior to June 1, 2021, and if so it sets it to that date. So this should get you past this problem. Please let me know if it works. (Version 0.7.16)

Also for future reference, you can change values of appPrefs, by hand, by making the change in the console, and then calling prefsChanged (). That will cause the prefs to be saved to the server so the change becomes permanent. But if you do this, please don't ask me to clean it up, much better to file a bug report like this, and let me fix the app. ;-)

am1t commented 3 years ago

@scripting Thank you, Dave. This reduced the time it took to build the JSON, as it only goes back till June 1 now. Just FYI though, it still checks for every day till June 1st and logs 404s when there's no entry.

scripting commented 3 years ago

@am1t -- it will do that until you have built up enough days worth of linkblogging to fill up the page, then it will stop going back so far in time.

cro commented 2 years ago

Hi @scripting , is something up with the linkblog.json generation? My rss.xml matches what I see on radio3.io but linkblog.json only has a few entries on it.

allthisness commented 1 year ago

I have a Radio3 linkblog here: http://radio3.io/users/allthisness/

I have also embedded it in a tab on my Drummer blog here: http://oldschool.scripting.com/allthisness/?tab=links

However the linkblog in the tab doesn’t update.

Any ideas? Thank you.

scripting commented 1 year ago

The Drummer support site is here.

https://github.com/scripting/drummerSupport/issues

allthisness commented 1 year ago

Thank you. Sorry I thought it might be a Radio3 issue.

scripting commented 1 year ago

It is a Radio3 issue, but the users are over there in DrummerLand.

trickyskills commented 1 year ago

Hi there

I've being getting an error when trying to sign in to R3 in the past few weeks:

{ "statusCode": 401, "data": "{\"errors\":[{\"code\":32,\"message\":\"Could not authenticate you.\"}]}" }

I've trying signing out of Twitter on my desktop and trying again in a new browser. Any ideas please?

Many thanks

scripting commented 1 year ago

Twitter turned off the api. I should probably remove the app.

On Sunday, July 16, 2023, trickyskills @.***> wrote:

Hi there

I've being getting an error when trying to sign in to R3 in the past few weeks:

{ "statusCode": 401, "data": "{"errors":[{"code":32,"message":"Could not authenticate you."}]}" }

I've trying signing out of Twitter on my desktop and trying again in a new browser. Any ideas please?

Many thanks

— Reply to this email directly, view it on GitHub https://github.com/scripting/Scripting-News/issues/180#issuecomment-1637034283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM32OZRQI7AYU5HL7FBCRTXQOXIFANCNFSM4ONXBIQQ . You are receiving this because you were mentioned.Message ID: @.***>

--

trickyskills commented 1 year ago

Ah - no worries.

Many thanks for the app, Dave. It was wonderful for a while. Really appreciated.