diff --git a/public/50x.html b/public/50x.html
deleted file mode 100644
index 9071e0a..0000000
--- a/public/50x.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-Error
-
-
-
-An error occurred.
-Sorry, the page you are looking for is currently unavailable.
-Please try again later.
-If you are the system administrator of this resource then you should check
-the error log for details.
-Faithfully yours, nginx.
-
-
diff --git a/public/assets/css/oof.css b/public/assets/css/oof.css
index 3bc7b22..70edfb2 100644
--- a/public/assets/css/oof.css
+++ b/public/assets/css/oof.css
@@ -60,6 +60,14 @@ body {
font-style: normal;
}
+#audioplayerdivstop {
+ margin-bottom: 160px;
+}
+
+#playicon {
+ margin-bottom: 2px;
+}
+
#ws:link {
text-decoration: none;
color: inherit;
diff --git a/public/assets/img/star.png b/public/assets/img/star.png
index f4d2b69..fa00189 100644
Binary files a/public/assets/img/star.png and b/public/assets/img/star.png differ
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 cba80ef..e8a68b2 100644
--- a/public/assets/js/site.js
+++ b/public/assets/js/site.js
@@ -4,7 +4,6 @@ $(document).ready((function(){$("[data-bss-hover-animate]").mouseenter((function
/*! js-cookie v3.0.1 | MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;tPas d'épisode en cours";
+ document.getElementById("epstab").innerHTML = "épisodes";
+ clearcache();
+ });
+
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")
@@ -66,13 +84,54 @@ jQuery(function($) {
}
audio.addEventListener('timeupdate',function(){
+ var currentTime = audio.currentTime;
+ Cookies.set("lastep-time", currentTime);
var currentTime = audio.currentTime;
- Cookies.set("lastep-time", currentTime);
+ Cookies.set("lastep-time", currentTime, { expires: 365 });
},false);
});
+ function checkepcache(){
+ if (Cookies.get("lastep-src")){
+ console.log("yahh");
+ const epstab = document.getElementById("epstab");
+ playicon();
+ };
+ }
+
+ function keeplastepcache(){
+ Cookies.set("lastep_b4close-title", document.getElementById("lienep").innerHTML, { expires: 365 });
+ Cookies.set("lastep_b4close-time", document.getElementById("player").currentTime, { expires: 365 });
+ }
+
+ function clearcache(){
+ Cookies.remove("lastep-title");
+ Cookies.remove("lastep-body");
+ Cookies.remove("lastep-src");
+ Cookies.remove("lastep-time");
+ }
+
// player things
+ function playicon(){
+ const epstab = document.getElementById("epstab");
+ if (document.getElementById("lienep").src = "")
+ {
+ epstab.innerHTML = "épisodes";
+ }
+ else {
+ console.log("ayyyy");
+ epstab.innerHTML = "
" + " épisodes";
+ }
+
+ }
+
+ 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);
@@ -83,18 +142,18 @@ jQuery(function($) {
document.getElementById("lienep").innerHTML= title;
document.getElementById("sbody").innerHTML= body + "....";
document.getElementById("lienep").href= linkdec;
- document.getElementById("player").pause();
- 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)
+ audio.pause();
+ audio.setAttribute('src', linkdec);
+ if (title == Cookies.get("lastep_b4close-title")){
+ audio.currentTime = Cookies.get("lastep_b4close-time");
+ }
+ audio.load();
+ audio.play();
+ 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 714f600..489a0ed 100644
--- a/public/index.html
+++ b/public/index.html
@@ -72,7 +72,7 @@