This commit is contained in:
telangpu
2026-04-28 00:42:28 +08:00
parent 2fd1a741cf
commit cf55c2cad6
2522 changed files with 566733 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,61 @@
(function( $ ) {
'use strict';
$(document).on('update-blocker-layer-position', function() {
setTimeout(function(){
$(document).find('.dpd-blocker-layer:visible').each(function(){
var parent = $(this).parent();
var thumbnail = parent.find('.thumbnail-youtube');
var blocker_layer = parent.find('.dpd-blocker-layer');
if(Math.ceil(thumbnail.height()) >= Math.ceil(2 * (blocker_layer.find('.dpd-blocker-layer-content').height() + 80))){
blocker_layer.addClass('override');
}else{
blocker_layer.removeClass('override');
}
});
}, 300);
});
$(document).on('append-blocker-layer', function() {
$(document).find('img.thumbnail-youtube').each(function(){
// ignore modules 017b, 018, 019, 029
if(!$(this).closest('.module-017b').length && !$(this).closest('.stage-home-018-include').length && !$(this).closest('.header-theme-page-019-include').length && !$(this).closest('.w-benefits-3').length){
var parent = $(this).parent();
var blocker_layer = $('<div>');
var content = $('<div>');
var wrap_play_button = $('<div>');
var play_button = $('<img/>');
var note = $('<p>');
var button = $('<button type="button">');
note.addClass('font-normal').text(DPDBlockerLayer.text_note).attr('style', 'color: #fff !important');
button.addClass('btn btn-primary').text(DPDBlockerLayer.text_button).attr('style', 'width: auto');
content.addClass('dpd-blocker-layer-content').append(note).append(button);
play_button.addClass('play-button').attr({src: DPDBlockerLayer.icon, alt: ''});
wrap_play_button.addClass('wrap-play-button').append(play_button);
blocker_layer.addClass('dpd-blocker-layer override').append(wrap_play_button).append(content);
parent.find('.dpd-blocker-layer').remove();
parent.append(blocker_layer);
// click to show cookie settings
button.on('click', function(){
tC.privacyCenter.showPrivacyCenter();
return false;
});
}
});
$(document).trigger('update-blocker-layer-position');
});
$(document).on('remove-blocker-layer', function() {
$(document).find('.dpd-blocker-layer').remove();
});
var timeout_resize = null;
$(window).resize(function(){
clearTimeout(timeout_resize);
timeout_resize = setTimeout(function(){
$(document).trigger('update-blocker-layer-position');
}, 100);
});
// update for tab modules 007, 025c, 026b, 030-031, 004, 005
$(document).on('click', '.collapsible-toggle, .nav-item a[data-toggle="tab"]', function(){
$(document).trigger('update-blocker-layer-position');
});
})( jQuery );

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
jQuery(document).ready((function($){$(".carousel").on("touchstart",(function(event){var xClick=event.originalEvent.touches[0].pageX;$(this).one("touchmove",(function(event){var xMove=event.originalEvent.touches[0].pageX;Math.floor(xClick-xMove)>5?$(this).carousel("next"):Math.floor(xClick-xMove)<-5&&$(this).carousel("prev")})),$(".carousel").on("touchend",(function(){$(this).off("touchmove")}))})),$(".dpd-new-header-parcel-tracking").each((function(){openLink=$(this).find(".target-open-tab").val(),$(this).find(".icon-for-search-parcel-tracking").click((function(event){event.preventDefault();var input_id=$(this).siblings(".input-search").find("input").data("id"),keyword=$("input#"+input_id).val(),trackingLink=$(this).attr("value");trackingLink||(trackingLink=$(this).siblings("span.icon-for-search-parcel-tracking").attr("value"));var search=trackingLink+keyword;window.open(search,openLink).focus()}))})),$(this).find(".dpd-new-header-parcel-tracking input").on("keypress",(function(e){if(13===e.which){var span_e=$(this).closest(".dpd-new-header-parcel-tracking").find("span:visible");if(span_e.length>1)return void span_e.eq(1).click();span_e.eq(0).click()}}))}));

View File

@@ -0,0 +1 @@
jQuery(document).ready((function($){$(this).find(".so-widget-search-parcel-tracking-embedded-widget").each((function(){openLink=$(this).find(".target-open-tab").val(),$(this).find(".icon-for-search-parcel-tracking").click((function(event){event.preventDefault();var input_id=$(this).siblings("input").data("id"),keyword=$("input#"+input_id).val(),trackingLink=$(this).attr("value");trackingLink||(trackingLink=$(this).siblings("span.icon-for-search-parcel-tracking").attr("value"));var search=trackingLink+keyword;window.open(search,openLink).focus()}))})),$(this).find(".so-widget-search-parcel-tracking-embedded-widget input").on("keypress",(function(e){if(13===e.which){var span_e=$(this).closest(".so-widget-search-parcel-tracking-embedded-widget").find("span:visible");if(span_e.length>1)return void span_e.eq(1).click();span_e.eq(0).click()}}))}));

View File

@@ -0,0 +1 @@
jQuery(document).ready((function($){$(this).find(".so-widget-search-parcel-tracking-widget").each((function(){openLink=$(this).find(".target-open-tab").val(),$(this).find(".icon-for-search-parcel-tracking").click((function(event){event.preventDefault();var input_id=$(this).siblings("input").data("id"),keyword=$("input#"+input_id).val(),trackingLink=$(this).attr("value");trackingLink||(trackingLink=$(this).siblings("span.icon-for-search-parcel-tracking").attr("value"));var search=trackingLink+keyword;window.open(search,openLink).focus()}))})),$(this).find(".so-widget-search-parcel-tracking-widget input").on("keypress",(function(e){if(13===e.which){var span_e=$(this).closest(".so-widget-search-parcel-tracking-widget").find("span:visible");if(span_e.length>1)return void span_e.eq(1).click();span_e.eq(0).click()}}))}));

View File

@@ -0,0 +1 @@
jQuery(document).ready(function($){$("#search-support").click(function(event){event.preventDefault();var keyword=$("input#sp-search").val();$("#search-form").submit(),window.open(search,"_blank").focus()})});

View File

@@ -0,0 +1 @@
jQuery(document).ready(function($){var $$=$(".so-widget-dpd-text-teaser-psfinder-widget");$$.find("input").focus(function(){$(this).css("color","#414042"),$(this).val()==$(this).attr("placeholder")&&$(this).val("")}),$$.find("input").blur(function(){""===$(this).val()&&($(this).val($(this).attr("placeholder")),$(this).css("color",$(this).data("placeholder-color")))}),$$.find("i").click(function(event){event.preventDefault();var keyword=$(this).parent().find("input").val();keyword==$(this).parent().find("input").attr("placeholder")&&(keyword="");var url=$(this).data("url")+keyword,target=$(this).data("target");window.open(url,target).focus()}),$$.find("input").on("keypress",function(e){if(13===e.which){var keyword=$(this).val();keyword==$(this).attr("placeholder")&&(keyword="");var url=$(this).data("url")+keyword,target=$(this).data("target");window.open(url,target).focus()}})});

View File

@@ -0,0 +1 @@
jQuery(document).ready((function($){var $$;jQuery(this).find(".so-widget-dpd-topic-switch-widget").each((function(){var module_id=jQuery(this).parent().find("input[type=hidden]").val(),id="#"+module_id,activeStyle="display: block; opacity: 1;",inactiveStyle="display: none; opacity: 0; transition: opacity 0.15s linear;";$(id).children().find("a").each((function(index){$(this).find("img").attr("src")||($(this).find("img").hide(),$(this).find("p").css("margin-left","21px")),$(this).click((function(){var image_id=module_id+"-"+(index+1)+"-media",btn_id=module_id+"-"+(index+1)+"-btn";$("#"+image_id).attr("style",""),$("#"+image_id).attr("style",activeStyle),$("#"+image_id).siblings("img").attr("style",inactiveStyle),$("#"+image_id).siblings("video").attr("style",inactiveStyle),$("#"+image_id).siblings("iframe").attr("style",inactiveStyle),$("#"+btn_id).attr("style",""),$("#"+btn_id).attr("style",activeStyle),$("#"+btn_id).siblings("div").attr("style",inactiveStyle);var active=$(this).find("img").data("active"),alt=$(this).find("img").data("active-alt");active?($(this).find("img").show(),$(this).find("img").attr("src",active),$(this).find("img").attr("alt",alt),$(this).find("p").css("margin-left","25px")):($(this).find("img").hide(),$(this).find("p").css("margin-left","21px")),$(this).closest("li").siblings().each((function(){var inactive=$(this).find("img").data("inactive"),in_alt=$(this).find("img").data("inactive-alt");inactive?($(this).find("img").show(),$(this).find("img").attr("src",inactive),$(this).find("img").attr("alt",in_alt),$(this).find("p").css("margin-left","25px")):($(this).find("img").hide(),$(this).find("p").css("margin-left","21px"))}))}))})),$(id+"-mb-tab").find(".w-tw-icon-box").each((function(index){$(this).find("img").first().attr("src")||($(this).find("img").first().hide(),$(this).find("p").first().css("margin-left","0px")),$(this).click((function(){var active=$(this).find("img").first().data("active"),inactive=$(this).find("img").first().data("inactive"),alt=$(this).find("img").first().data("active-alt"),in_alt=$(this).find("img").first().data("inactive-alt");$(this).hasClass("show")?active?($(this).find("img").first().show(),$(this).find("img").first().attr("src",active),$(this).find("img").first().attr("alt",alt),$(this).find("p").first().css("margin-left","16px")):($(this).find("img").first().hide(),$(this).find("p").first().css("margin-left","0px")):inactive?($(this).find("img").first().show(),$(this).find("img").first().attr("src",inactive),$(this).find("img").first().attr("alt",in_alt),$(this).find("p").first().css("margin-left","16px")):($(this).find("img").first().hide(),$(this).find("p").first().css("margin-left","0px"))}))}))}))}));