Closed psandtner closed 8 years ago
@psandtner Can't you get the video ID using a simple http request? Your script creates a new event listener in the extension's global page for each video. That sounds bad...
@hoyois My investigations on http://www.spiegel.de/video/ came to the conclusion that the video ID only resides in the DOM. The "data" variable does not contain any useful information. I’m new to safari-extensions and javascript ist not my best friend. I understand the problem with the event listeners. Is it possible to change my approach to only register it once?
I don't see how, no. To properly work with dynamic DOMs, we'd need the data variable to contain the whole DOM, which doesn't sound great either (and anyway can't be helped now). At least, you can remove the event listener when the message is received.
I've made some more changes to the killer. What do you think?
Sorry, closing by mistake.
Thanks, I've uploaded the new killer.
https://github.com/hoyois/plugin-to-html5/blob/master/Spiegel.js
The current killer „Spiegel.js“ does not work anymore. Attached is a new one.
@hoyois: Could you please update it?
Spiegel.js.txt