diff options
author | Sam Potts <me@sampotts.me> | 2015-12-11 10:41:29 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2015-12-11 10:41:29 +1100 |
commit | 1371c1341fcc95d52394dc3f69900ae5041a5701 (patch) | |
tree | 9f79c1ab6b162d21b70cda618a1cb5ad2123052a /docs/src/js/docs.js | |
parent | 05bf08a4389ec5c72627f709761578d80b40603f (diff) | |
download | plyr-1371c1341fcc95d52394dc3f69900ae5041a5701.tar.lz plyr-1371c1341fcc95d52394dc3f69900ae5041a5701.tar.xz plyr-1371c1341fcc95d52394dc3f69900ae5041a5701.zip |
Removed Hogan from Docs (Fixes #128)
Diffstat (limited to 'docs/src/js/docs.js')
-rw-r--r-- | docs/src/js/docs.js | 52 |
1 files changed, 8 insertions, 44 deletions
diff --git a/docs/src/js/docs.js b/docs/src/js/docs.js index 981ace40..518e4e0c 100644 --- a/docs/src/js/docs.js +++ b/docs/src/js/docs.js @@ -2,14 +2,13 @@ // Docs example // ========================================================================== -/*global plyr, templates */ +/*global plyr, shr*/ // Setup the player plyr.setup({ debug: true, volume: 9, title: "Video demo", - html: templates.controls.render({}), tooltips: true, captions: { defaultActive: true @@ -31,50 +30,15 @@ plyr.setup({ } }); -// General functions -(function() { - // Popup - function popup(event) { - // Prevent the link opening - if(event.target.nodeName.toLowerCase() == "a") { - if(event.preventDefault) { - event.preventDefault(); - } - else { - event.returnValue = false; - } - } - - var link = event.target, - url = link.href, - width = link.getAttribute("data-window-width") || 600, - height = link.getAttribute("data-window-height") || 600, - name = link.getAttribute("data-window-name") || "popup"; - - // If window exists, just focus it - if(window["window-"+name] && !window["window-"+name].closed) { - window["window-"+name].focus(); - } - else { - // Get position - var left = window.screenLeft !== undefined ? window.screenLeft : screen.left; - var top = window.screenTop !== undefined ? window.screenTop : screen.top; - - // Open in the centre of the screen - var x = (screen.width / 2) - (width / 2) + left, - y = (screen.height / 2) - (height / 2) + top; - - // Open that window - window["window-"+name] = window.open(url, name, "top=" + y +",left="+ x +",width=" + width + ",height=" + height); - - // Focus new window - window["window-"+name].focus(); - } +// Setup shr +shr.setup({ + count: { + classname: "btn-count" } +}); - // Trigger popups - document.querySelector(".js-popup").addEventListener("click", popup); - +// General functions +(function() { // Tabs var tabs = document.querySelectorAll(".nav-panel a"), panels = document.querySelectorAll(".panels > .panel"), |