diff --git a/public/assets/css/oof.css b/public/assets/css/oof.css
index 3bc7b22..851a8ff 100644
--- a/public/assets/css/oof.css
+++ b/public/assets/css/oof.css
@@ -60,6 +60,10 @@ body {
font-style: normal;
}
+#audioplayerdivstop {
+ margin-bottom: 160px;
+}
+
#ws:link {
text-decoration: none;
color: inherit;
diff --git a/public/assets/img/stop-button-svgrepo-com.svg b/public/assets/img/stop-button-svgrepo-com.svg
new file mode 100644
index 0000000..bd09aff
--- /dev/null
+++ b/public/assets/img/stop-button-svgrepo-com.svg
@@ -0,0 +1,39 @@
+
+
+
diff --git a/public/assets/js/site.js b/public/assets/js/site.js
index cebd659..fecd120 100644
--- a/public/assets/js/site.js
+++ b/public/assets/js/site.js
@@ -67,6 +67,10 @@ jQuery(function($) {
var audio = document.getElementById('player');
console.log(audio.src);
+ // check if ep is in cache
+
+ checkepcache();
+
// cookie last playback
if (Cookies.get("lastep-title")) {
console.log("playback function")
@@ -78,13 +82,31 @@ jQuery(function($) {
}
audio.addEventListener('timeupdate',function(){
+<<<<<<< HEAD
var currentTime = audio.currentTime;
Cookies.set("lastep-time", currentTime);
+=======
+ var currentTime = audio.currentTime;
+ Cookies.set("lastep-time", currentTime, { expires: 365 });
+>>>>>>> 9f36b512a893a4955dde67afea5f1b675cf31c05
},false);
});
+ function checkepcache(){
+ if (Cookies.get("lastep-src")){
+ console.log("yahh");
+ const epstab = document.getElementById("epstab");
+ epstab.innerHTML = "" + " épisodes";
+ };
+ }
// player things
+ function stopplayer(){
+ document.getElementById("lienep").innerHTML= title;
+ document.getElementById("sbody").innerHTML= body + "....";
+ document.getElementById("lienep").href= linkdec;
+ }
+
function play(src, title, date, body) {
var audio = document.getElementById('player');
console.log(src);
@@ -99,15 +121,12 @@ jQuery(function($) {
document.getElementById("player").setAttribute('src', linkdec);
document.getElementById("player").load();
document.getElementById("player").play();
- Cookies.set("lastep-title", title)
- Cookies.set("lastep-src", audio.src);
- Cookies.set("lastep-body", body)
+ Cookies.set("lastep-title", title, { expires: 365 });
+ Cookies.set("lastep-src", audio.src, { expires: 365 });
+ Cookies.set("lastep-body", body, { expires: 365 });
+ checkepcache();
}
-
-
-
-
function switchTab() {
$('[href="#ep"]').tab('show');
}
diff --git a/public/index.html b/public/index.html
index 89ffb56..7257381 100644
--- a/public/index.html
+++ b/public/index.html
@@ -72,7 +72,7 @@