{"action":"closed","issue":{"url":"https://api.github.com/repos/ZachSaucier/Just-Read/issues/216","repository_url":"https://api.github.com/repos/ZachSaucier/Just-Read","labels_url":"https://api.github.com/repos/ZachSaucier/Just-Read/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/ZachSaucier/Just-Read/issues/216/comments","events_url":"https://api.github.com/repos/ZachSaucier/Just-Read/issues/216/events","html_url":"https://github.com/ZachSaucier/Just-Read/issues/216","id":381713439,"node_id":"MDU6SXNzdWUzODE3MTM0Mzk=","number":216,"title":"Adding custom Javascript to Just Read pages","user":{"login":"StevenTammen","id":14948260,"node_id":"MDQ6VXNlcjE0OTQ4MjYw","avatar_url":"https://avatars2.githubusercontent.com/u/14948260?v=4","gravatar_id":"","url":"https://api.github.com/users/StevenTammen","html_url":"https://github.com/StevenTammen","followers_url":"https://api.github.com/users/StevenTammen/followers","following_url":"https://api.github.com/users/StevenTammen/following{/other_user}","gists_url":"https://api.github.com/users/StevenTammen/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenTammen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenTammen/subscriptions","organizations_url":"https://api.github.com/users/StevenTammen/orgs","repos_url":"https://api.github.com/users/StevenTammen/repos","events_url":"https://api.github.com/users/StevenTammen/events{/privacy}","received_events_url":"https://api.github.com/users/StevenTammen/received_events","type":"User","site_admin":false},"labels":[{"id":277557310,"node_id":"MDU6TGFiZWwyNzc1NTczMTA=","url":"https://api.github.com/repos/ZachSaucier/Just-Read/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-16T18:35:12Z","updated_at":"2018-11-17T15:02:21Z","closed_at":"2018-11-17T15:02:21Z","author_association":"NONE","body":"I came across your app while researching replacements for Evernote clearly that allowed for custom CSS. I'm pleased with how things work, but realized a few articles in that there are several Javascript libraries on some of the pages I commonly read that don't make it into the iframe.\r\n\r\nFor example, some websites make use of a [Bible-verse tagger](https://faithlife.com/products/reftagger) that shows tooltip windows when hovering over verse references. I haven't looked at the exact implementation, but it appears to do a couple things:\r\n\r\n1. Use regular expressions to traverse the DOM on page load, replacing matching text with links to a particular site's API (also giving these links a special class).\r\n2. Register event handlers for this class of links on link hover. The handlers seem to use appendChild() to add `<div>`'s with custom classes to the bottom of `<body>`. After the cursor leaves the tooltip window, these added `<div>`'s are then deleted.\r\n\r\n(1) Seems to work fine with Just Read (although I haven't tried it with Just Read automatically activating on pages: there might be a race condition here). (2), however, does not work at all.\r\n\r\nA very similar case happens with footnotes that use tooltips. For example, have a look at the page for this [jQuery Footnote Plugin](http://bigfootjs.com/). Without any Javascript in the iframe, the footnotes do not do anything.\r\n\r\n----------------------------\r\n\r\nI am relatively new to web programming (and iframes in particular), and it is unclear to me if it would be possible to have behavior like this work for pages transformed with Just Read. I understand that this application is focused on web pages that take an article form, and hence doesn't concern itself with source page's Javascript. However, I can see situations in which Javascript is actually important for reading the page properly (as above), and it seems to me like it would be very useful to be able to include it in the iframe in some situations. (Either injecting custom Javascript into all Just Read pages, or injecting specific Javascript on specific pages that match regular expressions).\r\n\r\nWhat do you think? I have some more detailed ideas, but will hold off on further elaboration for the moment.\r\n\r\n\r\n(P.S. -- It's cool to see something this developed come out of UGAHacks. I went last year -- I'm a CS student at UGA -- and we didn't make anything nearly so impressive.)"}}
{"actor":{"display_login":"ZachSaucier"}}