Compare commits
10 commits
c8b022f3c0
...
a4f5389fb1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4f5389fb1 | ||
|
|
c5b2059e91 | ||
|
|
b6ee887ecc | ||
|
|
369d7f3126 | ||
|
|
4c44e48c4b | ||
|
|
9b9c6c257e | ||
|
|
760b34d878 | ||
|
|
f51877ea27 | ||
|
|
4e58f3a710 | ||
|
|
5028a0afbd |
4 changed files with 69 additions and 6 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.DS_Store
|
||||
32
index.html
32
index.html
|
|
@ -11,6 +11,13 @@
|
|||
<title>Watermelon Movies 🍉</title>
|
||||
<link rel="icon" type="image/x-icon" href="favicon_watermelon_icon.ico">
|
||||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||
<!-- iOS Meta Tags -->
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="Watermelon Movies 🍉">
|
||||
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png">
|
||||
|
||||
<style>
|
||||
/* Custom styles for movie tiles */
|
||||
.movie-tile {
|
||||
|
|
@ -135,6 +142,7 @@
|
|||
.video-modal-content {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
height: 70vh;
|
||||
}
|
||||
.close {
|
||||
font-size: 24px;
|
||||
|
|
@ -689,7 +697,7 @@
|
|||
<span class="close">×</span>
|
||||
<div style="border-radius: 10px; width: 100%; overflow: hidden;">
|
||||
<div id="iframeContainer">
|
||||
<iframe id="videoIframe" width="100%" height="500px" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe id="videoIframe" width="100%" height="300px" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -752,7 +760,7 @@
|
|||
let currentImdbId = null;
|
||||
let currentSeason = 1;
|
||||
let currentEpisode = 1;
|
||||
let currentSource = 'player.vidsrc.co'; // Default source
|
||||
let currentSource = 'vidsrc.cc'; // Default source
|
||||
|
||||
// Genre IDs mapping for creating meaningful categories
|
||||
const genreMap = {
|
||||
|
|
@ -1227,8 +1235,8 @@
|
|||
// Function to load video from current source
|
||||
function loadVideoSource() {
|
||||
let videoUrl;
|
||||
if (currentSource === 'player.vidsrc.co') {
|
||||
videoUrl = 'https://player.vidsrc.co/embed/';
|
||||
if (currentSource === 'vidsrc.cc') {
|
||||
videoUrl = 'https://vidsrc.cc/v2/embed/';
|
||||
if (currentMediaType === 'movie') {
|
||||
videoUrl += `movie/${currentImdbId}`;
|
||||
} else if (currentMediaType === 'tv') {
|
||||
|
|
@ -1338,8 +1346,8 @@
|
|||
// Set up alternate source button
|
||||
document.getElementById('altSourceBtn').addEventListener('click', function() {
|
||||
// Toggle between sources
|
||||
currentSource = currentSource === 'player.vidsrc.co' ? 'vidsrc.xyz' : 'player.vidsrc.co';
|
||||
this.textContent = `Try ${currentSource === 'player.vidsrc.co' ? 'vidsrc.xyz' : 'player.vidsrc.co'}`;
|
||||
currentSource = currentSource === 'vidsrc.cc' ? 'vidsrc.xyz' : 'vidsrc.cc';
|
||||
this.textContent = `Try ${currentSource === 'vidsrc.cc' ? 'vidsrc.xyz' : 'vidsrc.cc'}`;
|
||||
|
||||
// Reload with new source
|
||||
loadVideoSource();
|
||||
|
|
@ -1647,6 +1655,18 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Web App, Add to homescreen Service Worker
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('/sw.js').then(function(registration) {
|
||||
console.log('Service Worker registered with scope:', registration.scope);
|
||||
}).catch(function(error) {
|
||||
console.log('Service Worker registration failed:', error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
21
manifest.json
Normal file
21
manifest.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "🍉",
|
||||
"short_name": "🏴☠️",
|
||||
"description": "The Jews took Hollywood, we're stealing it back",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#32cd32",
|
||||
"theme_color": "#32cd32",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/androis-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/androis-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
21
sw.js
Normal file
21
sw.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
self.addEventListener('install', function(event) {
|
||||
event.waitUntil(
|
||||
caches.open('watermelon-movies-cache').then(function(cache) {
|
||||
return cache.addAll([
|
||||
'/',
|
||||
'/index.html',
|
||||
'/style.css',
|
||||
'/icons/apple-touch-icon.png',
|
||||
'/manifest.json'
|
||||
]);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', function(event) {
|
||||
event.respondWith(
|
||||
caches.match(event.request).then(function(response) {
|
||||
return response || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue