Spaces:
Running
Running
bobwatcherx
commited on
Commit
•
3fffc61
1
Parent(s):
3362755
312
Browse files- package.json +2 -1
- src/com/Renderdata.svelte +7 -3
- src/func/simpanbokep.js +22 -0
- src/routes/home/+page.svelte +5 -0
- src/routes/p/[id]/+page.svelte +1 -1
- src/routes/simpan/+page.svelte +125 -0
- yarn.lock +5 -0
package.json
CHANGED
@@ -19,6 +19,7 @@
|
|
19 |
"@sveltejs/adapter-node": "^5.0.1",
|
20 |
"adapter": "^1.0.0-beta.10",
|
21 |
"from": "^0.1.7",
|
22 |
-
"import": "^0.0.6"
|
|
|
23 |
}
|
24 |
}
|
|
|
19 |
"@sveltejs/adapter-node": "^5.0.1",
|
20 |
"adapter": "^1.0.0-beta.10",
|
21 |
"from": "^0.1.7",
|
22 |
+
"import": "^0.0.6",
|
23 |
+
"sweetalert2": "^11.12.2"
|
24 |
}
|
25 |
}
|
src/com/Renderdata.svelte
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
export let movies
|
3 |
import {directlink_url} from '../base/config.js'
|
4 |
import {randomAngka} from '../func/randomAngka.js'
|
5 |
-
|
6 |
|
7 |
let btndisable = false
|
8 |
let btnteks = "Nonton"
|
@@ -47,8 +47,12 @@
|
|
47 |
<span class="pink-text bold-text">{truncateTitle(movie.title, 40)}</span>
|
48 |
|
49 |
</div>
|
50 |
-
<div style="display: flex;justify-content:
|
51 |
-
|
|
|
|
|
|
|
|
|
52 |
<button
|
53 |
on:click={()=>gantipage(movie.file_code)}
|
54 |
class="btn waves bold-text waves-effect pink"
|
|
|
2 |
export let movies
|
3 |
import {directlink_url} from '../base/config.js'
|
4 |
import {randomAngka} from '../func/randomAngka.js'
|
5 |
+
import {simpanfilm} from '../func/simpanbokep.js'
|
6 |
|
7 |
let btndisable = false
|
8 |
let btnteks = "Nonton"
|
|
|
47 |
<span class="pink-text bold-text">{truncateTitle(movie.title, 40)}</span>
|
48 |
|
49 |
</div>
|
50 |
+
<div style="display: flex;justify-content: space-between;margin:5px;margin-top:5px">
|
51 |
+
<button
|
52 |
+
on:click={()=>simpanfilm(movie)}
|
53 |
+
class="btn waves bold-text waves-effect blue"
|
54 |
+
>
|
55 |
+
Simpan</button>
|
56 |
<button
|
57 |
on:click={()=>gantipage(movie.file_code)}
|
58 |
class="btn waves bold-text waves-effect pink"
|
src/func/simpanbokep.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import Swal from 'sweetalert2';
|
2 |
+
|
3 |
+
export function simpanfilm(movie) {
|
4 |
+
const existingData = localStorage.getItem('movies');
|
5 |
+
let movies = [];
|
6 |
+
|
7 |
+
if (existingData) {
|
8 |
+
movies = JSON.parse(existingData);
|
9 |
+
}
|
10 |
+
|
11 |
+
movies.push(movie);
|
12 |
+
|
13 |
+
localStorage.setItem('movies', JSON.stringify(movies));
|
14 |
+
|
15 |
+
Swal.fire({
|
16 |
+
toast:true,
|
17 |
+
icon: 'success',
|
18 |
+
title: 'Bokep nya udah di simpan',
|
19 |
+
showConfirmButton: false,
|
20 |
+
timer: 1000
|
21 |
+
});
|
22 |
+
}
|
src/routes/home/+page.svelte
CHANGED
@@ -20,5 +20,10 @@
|
|
20 |
class="btn waves waves-effect purple darken-3 bold-text"
|
21 |
>Cari Bokep</a>
|
22 |
</div>
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
<Renderdata movies={data}/>
|
|
|
20 |
class="btn waves waves-effect purple darken-3 bold-text"
|
21 |
>Cari Bokep</a>
|
22 |
</div>
|
23 |
+
<div class="container" style="margin-top: 10px">
|
24 |
+
<a href="/simpan"
|
25 |
+
class="btn waves waves-effect blue bold-text"
|
26 |
+
>Bokep Tersimpan</a>
|
27 |
+
</div>
|
28 |
|
29 |
<Renderdata movies={data}/>
|
src/routes/p/[id]/+page.svelte
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
<div class="container" style="margin-top:10px">
|
52 |
<a href="/home" class="btn waves waves-effect pink">Kembali</a>
|
53 |
<a href="/cari" class="btn waves waves-effect purple darken-3 bold-text">cari Bokep</a>
|
54 |
-
<a href="/
|
55 |
</div>
|
56 |
|
57 |
{#if loadingframe}
|
|
|
51 |
<div class="container" style="margin-top:10px">
|
52 |
<a href="/home" class="btn waves waves-effect pink">Kembali</a>
|
53 |
<a href="/cari" class="btn waves waves-effect purple darken-3 bold-text">cari Bokep</a>
|
54 |
+
<a href="/simpan" class="btn waves waves-effect blue darken-3 bold-text">tersimpan</a>
|
55 |
</div>
|
56 |
|
57 |
{#if loadingframe}
|
src/routes/simpan/+page.svelte
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script>
|
2 |
+
import { onMount } from 'svelte';
|
3 |
+
import Swal from 'sweetalert2';
|
4 |
+
import Nav from '../../com/Nav.svelte';
|
5 |
+
import { directlink_url } from '../../base/config.js';
|
6 |
+
import { randomAngka } from '../../func/randomAngka.js';
|
7 |
+
|
8 |
+
let movies = [];
|
9 |
+
let btndisable = false;
|
10 |
+
let btnteks = "Nonton";
|
11 |
+
|
12 |
+
// Function to retrieve movies from localStorage
|
13 |
+
function getMovies() {
|
14 |
+
const data = localStorage.getItem('movies');
|
15 |
+
if (data) {
|
16 |
+
movies = JSON.parse(data).reverse(); // Reverse to show the newest items at the top
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
// Function to delete a movie by file_code
|
21 |
+
function deleteMovie(file_code) {
|
22 |
+
// Retrieve existing data from localStorage
|
23 |
+
const existingData = localStorage.getItem('movies');
|
24 |
+
if (existingData) {
|
25 |
+
let moviesList = JSON.parse(existingData);
|
26 |
+
// Find the index of the movie with the given file_code
|
27 |
+
const index = moviesList.findIndex(movie => movie.file_code === file_code);
|
28 |
+
if (index !== -1) {
|
29 |
+
moviesList.splice(index, 1);
|
30 |
+
|
31 |
+
// Save the updated data back to localStorage
|
32 |
+
localStorage.setItem('movies', JSON.stringify(moviesList));
|
33 |
+
|
34 |
+
// Update the movies array to trigger reactivity
|
35 |
+
movies = moviesList.reverse();
|
36 |
+
|
37 |
+
// Display a SweetAlert2 notification
|
38 |
+
Swal.fire({
|
39 |
+
icon: 'success',
|
40 |
+
title: 'Berhasil dihapus',
|
41 |
+
showConfirmButton: false,
|
42 |
+
timer: 1500
|
43 |
+
});
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
function gantipage(code) {
|
49 |
+
let ran = randomAngka();
|
50 |
+
if (ran === 1) {
|
51 |
+
btndisable = true;
|
52 |
+
btnteks = "Sabar Bos";
|
53 |
+
window.location.href = `/p/${code}`;
|
54 |
+
} else {
|
55 |
+
window.open(directlink_url, "_blank");
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
onMount(() => {
|
60 |
+
getMovies();
|
61 |
+
});
|
62 |
+
|
63 |
+
function deleteAllMovies() {
|
64 |
+
localStorage.removeItem('movies');
|
65 |
+
movies = []; // Clear the movies array
|
66 |
+
Swal.fire({
|
67 |
+
icon: 'success',
|
68 |
+
title: 'Semua film telah dihapus',
|
69 |
+
showConfirmButton: false,
|
70 |
+
timer: 1500
|
71 |
+
});
|
72 |
+
}
|
73 |
+
|
74 |
+
</script>
|
75 |
+
|
76 |
+
<style>
|
77 |
+
.row .col {
|
78 |
+
margin: 0px;
|
79 |
+
padding: 0px;
|
80 |
+
}
|
81 |
+
.bold-text {
|
82 |
+
font-weight: bold;
|
83 |
+
}
|
84 |
+
</style>
|
85 |
+
|
86 |
+
<Nav />
|
87 |
+
<div>
|
88 |
+
<div class="container">
|
89 |
+
<a href="/home" class="btn waves waves-effect pink">kembali</a>
|
90 |
+
<a href="/cari" class="btn waves waves-effect purple bold-text">cari</a>
|
91 |
+
<button
|
92 |
+
class="btn waves waves-effect red white-text bold-text"
|
93 |
+
on:click={deleteAllMovies}
|
94 |
+
>
|
95 |
+
Hapus Semua
|
96 |
+
</button>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<div class="container">
|
100 |
+
<h5 class="bold-text">Semua Bokep yg udah lu Simpen</h5>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<div class="row">
|
104 |
+
{#each movies as movie}
|
105 |
+
<div class="col s6 m4 l4">
|
106 |
+
<div class="card waves waves-effect">
|
107 |
+
<img src={movie.single_img} style="width: 100%" alt="">
|
108 |
+
<div class="container">
|
109 |
+
<span class="pink-text bold-text">{movie.title}</span>
|
110 |
+
</div>
|
111 |
+
<div style="display: flex; justify-content: space-between; margin: 3px">
|
112 |
+
<button class="btn waves bold-text waves-effect red" on:click={() => deleteMovie(movie.file_code)}>Hapus</button>
|
113 |
+
<button
|
114 |
+
on:click={() => gantipage(movie.file_code)}
|
115 |
+
class="btn waves bold-text waves-effect blue"
|
116 |
+
disabled={btndisable}
|
117 |
+
>
|
118 |
+
{btnteks}
|
119 |
+
</button>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
{/each}
|
124 |
+
</div>
|
125 |
+
</div>
|
yarn.lock
CHANGED
@@ -782,6 +782,11 @@ svelte@^4.2.7:
|
|
782 |
magic-string "^0.30.4"
|
783 |
periscopic "^3.1.0"
|
784 |
|
|
|
|
|
|
|
|
|
|
|
785 |
tiny-glob@^0.2.9:
|
786 |
version "0.2.9"
|
787 |
resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2"
|
|
|
782 |
magic-string "^0.30.4"
|
783 |
periscopic "^3.1.0"
|
784 |
|
785 |
+
sweetalert2@^11.12.2:
|
786 |
+
version "11.12.2"
|
787 |
+
resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.12.2.tgz#3430b6bd66f732ae6c36b19ff965da5b01b1e3fd"
|
788 |
+
integrity sha512-Rwv5iRYlApkDSXeX22aLhhWMlWPzFxnNBVLZajkFKYhaVEfQkMOPQQRhBtSFxKBPCoko9U3SccWm9hI4o3Id0Q==
|
789 |
+
|
790 |
tiny-glob@^0.2.9:
|
791 |
version "0.2.9"
|
792 |
resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2"
|