Skip to content
This repository was archived by the owner on Jan 31, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "public/external/popcorn-js"]
path = public/external/popcorn-js
url = git://github.com/mozilla/popcorn-js.git
[submodule "public/external/WebComponents"]
path = public/external/WebComponents
url = git://github.com/toolkitchen/WebComponents.git
[submodule "public/external/CustomElements"]
path = public/external/CustomElements
url = git://github.com/toolkitchen/CustomElements.git
1 change: 1 addition & 0 deletions public/external/CustomElements
Submodule CustomElements added at d1f37d
1 change: 1 addition & 0 deletions public/external/WebComponents
Submodule WebComponents added at a83133
13 changes: 11 additions & 2 deletions public/src/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,17 @@ function init() {
"popcorn"
],
function( URI, Controls, TextboxWrapper ) {
// cornfield writes out the Popcorn initialization code as popcornDataFn()
window.popcornDataFn();

// Popcorn loads after our custom elements have been parsed so we need to run through
// any popcorn calls they tried to make first.
var queuedFunctions = window.popcornFunctionQueue;

for ( var i = 0; i < queuedFunctions.length; i++ ) {
queuedFunctions[ i ]();
}

window.queuedFunctions = null;

/**
* Expose Butter so we can get version info out of the iframe doc's embed.
* This "butter" is never meant to live in a page with the full "butter".
Expand Down
1 change: 1 addition & 0 deletions public/src/popcorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ requirejs.config({
"popcorn.text": [ "popcorn.core" ],
"popcorn.twitter": [ "popcorn.core" ],
"popcorn.wikipedia": [ "popcorn.core" ]

}
});

Expand Down
Loading