Skip to content

Commit

Permalink
Start with card id
Browse files Browse the repository at this point in the history
  • Loading branch information
yumata committed Nov 14, 2023
1 parent abc2d17 commit f030afe
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions app.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -26434,6 +26434,27 @@

this.append();
}

function parseCardLink() {
var uri;

try {
uri = new URL(window.location);
} catch (e) {}

if (uri && uri.searchParams.get('card') && !window.start_deep_link) {
window.start_deep_link = {
id: uri.searchParams.get('card'),
component: "full",
method: uri.searchParams.get('media') || 'movie',
source: uri.searchParams.get('source') || 'cub',
card: {
id: uri.searchParams.get('card'),
source: uri.searchParams.get('source') || 'cub'
}
};
}
}
/**
* Запуск
*/
Expand All @@ -26443,6 +26464,7 @@
content = Template$1.js('activitys');
slides = content.querySelector('.activitys__slides');
maxsave = Storage.get('pages_save_total', 5);
parseCardLink();
empty();
var wait = true;
setTimeout(function () {
Expand Down Expand Up @@ -26683,25 +26705,9 @@
function last$1() {
var active = Storage.get('activity', 'false');
var start_from = Storage.field("start_page");
var uri;

try {
uri = new URL(window.location);
} catch (e) {}

if (window.start_deep_link) {
push$1(window.start_deep_link);
} else if (uri && uri.searchParams.get('card')) {
push$1({
id: uri.searchParams.get('id'),
component: "full",
method: uri.searchParams.get('media') || 'movie',
source: uri.searchParams.get('source') || 'cub',
card: {
id: uri.searchParams.get('id'),
source: uri.searchParams.get('source') || 'cub'
}
});
} else if (active && start_from === "last") {
if (active.page) active.page = 1;
push$1(active);
Expand Down

0 comments on commit f030afe

Please sign in to comment.