add cookie on web

This commit is contained in:
Nyagami
2024-01-14 22:03:37 +07:00
parent 73bb7e9509
commit 8e3909c1d2
4 changed files with 69 additions and 26 deletions
+17
View File
@@ -922,6 +922,23 @@ class PluginWrapper {
}
}
$("#add-cookie-btn").on("click", () => {
const cookie = $('#cookie').val();
fetch('/add_cookie', {
method: 'POST',
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
'cookie': cookie,
}),
}).then(() => {
$('#cookie').val('');
$('#cookie-content').text(`: ${cookie}`);
})
})
$(".popularNovels-btn").on("click", () =>
state.current_plugin?.getPopularNovels()
);