From ce513442699f4b3c964adf06d9baa49821351ce3 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Sat, 13 Feb 2016 22:18:42 +1100 Subject: iOS fix (Fixes #166), Edge Progress Tip (Fixes #160), SASS fix (Fixes #158) --- docs/src/js/docs.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'docs/src/js/docs.js') diff --git a/docs/src/js/docs.js b/docs/src/js/docs.js index 563d2ebe..bedb91cb 100644 --- a/docs/src/js/docs.js +++ b/docs/src/js/docs.js @@ -13,7 +13,8 @@ plyr.setup('.js-media-player', { }, captions: { defaultActive: true - } + }, + duration: 100 }); // Setup shr @@ -58,13 +59,19 @@ shr.setup({ // On load if(historySupport) { var video = !currentType.length; + + // If there's no current type set, assume video if(video) { currentType = types.video; } + + // Replace current history state if(currentType in types) { history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType)); } - if(!video) { + + // If it's not video, load the source + if(currentType !== types.video) { newSource(currentType, true); } } @@ -86,7 +93,6 @@ shr.setup({ function newSource(type, init) { // Bail if new type isn't known, it's the current type, or current type is empty (video is default) and new type is video if(!(type in types) || (!init && type == currentType) || (!currentType.length && type == types.video)) { - console.warn('Unregonized type.'); return; } -- cgit v1.2.3