Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: includes/scripts/initialize-videos.html

Issue 29703633: Noissue - Abstracted embedded video for use in blog (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Patch Set: Moved no-js application and iframe height+width Created Feb. 20, 2018, 10:35 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « includes/index.tmpl ('k') | pages/test.html » ('j') | static/css/video.css » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/scripts/initialize-videos.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/includes/scripts/initialize-videos.html
@@ -0,0 +1,7 @@
+<script>
+ document.addEventListener("DOMContentLoaded", function(event)
ire 2018/02/21 09:11:29 Why have this in a separate file? We can check for
juliandoucette 2018/02/21 10:35:18 I prefer to define a class/module in one file and
ire 2018/02/22 09:25:41 (Forgot to say that this is a NIT) Is there ever
juliandoucette 2018/02/23 13:31:07 I take your point. Thank you for explaining / push
ire 2018/02/26 18:33:18 You're welcome :)
+ {
+ window.videos = [].slice.call(document.querySelectorAll(".video-parent"))
+ .map(function(parent) {return new Video(parent);});
+ });
+</script>
« no previous file with comments | « includes/index.tmpl ('k') | pages/test.html » ('j') | static/css/video.css » ('J')

Powered by Google App Engine
This is Rietveld