PageSourceSearch

http://img.koreatimes.com/2015/js/expendable.js?v=2026-10-016825?v=3.4

js koreatimes.com collected 2026-10-02 02:57:25 UTC 8,998 bytes, 273 lines download raw bytes

1// expendable.js..
2
3var yt_player = null;
4var videoid = "t9avmSjKlII";
5var iframeAddrss = "";
6var expendable_target;
7var yt_int;
8
9function loadScript() {
10  var yt_int,
11    yt_players = {},
12    initYT = function () {
13      yt_players[this.id] = new YT.Player(this.id);
14    };
15
16  if ((typeof YT == "undefined" || typeof YT.Player == "undefined") && expendable_target != null) {
17    $.getScript("//www.youtube.com/iframe_api", function () {
18      yt_int = setInterval(function () {
19        if (typeof YT === "object") {
20          setTimeout(initYT(), 500);
21          clearInterval(yt_int);
22        }
23      }, 500);
24
25      loadScript();
26    });
27  } else {
28    youtubePlayerConstruct();
29  }
30}
31
32function youtubePlayerConstruct() {
33  yt_player = null;
34  yt_player = new YT.Player("youtubeapi", {
35    height: "500",
36    width: "100%",
37    videoId: videoid,
38
39    playerVars: {
40      autoplay: 1,
41      controls: 0,
42      mute: 1,
43      rel: 0,
44      disablekb: 1,
45      fs: 0,
46      showinfo: 0,
47      iv_load_policy: 3,
48      enablejsapi: 1,
49      nohtml5: 1,
50    },
51    events: {
52      onReady: function () {
53        iframeAddrss = yt_player.getIframe();
54      },
55      onStateChange: function (event) {
56        if (event.data == YT.PlayerState.PLAYING) {
57          setCookie(expendable_target, "close", 3);
58        } else if (event.data == YT.PlayerState.PAUSED || event.data == YT.PlayerState.ENDED) {
59          close_expendable();
60        }
61      },
62    },
63  });
64}
65
66function open_expendable(expendable_target) {
67  loadScript();
68  $(".banner_action").hide();
69
70  $("#mp_video").show();
71  $("#mp_image_box").show();
72
73  $("#mp_frame").css("height", "500px");
74  $("#mp_btn_open").hide();
75  $("#mp_btn_close").show();
76  $("#mp_btn_speaker").show();
77
78  $("#home_popup_frame").css("top", "1015px");
79}
80
81function close_expendable() {
82  if (yt_player != null && typeof yt_player === "object" && typeof yt_player !== "undefined") {
83    yt_player.destroy();
84    yt_player = null;
85  }
86
87  $("#mp_image_box").hide();
88
89  if (expendable_target == "kt_kia" || expendable_target == "kt_smg") {
90    $("#mp_frame").css({ height: "250px" });
91  } else if (expendable_target == "kt_hyundai" || expendable_target == "kt_hyundai2") {
92    $("#mp_frame").css({ height: "250px" });
93  } else if (expendable_target == "kt_cdss1") {
94    $("#mp_frame").css({ height: "250px" });
95  } else if (expendable_target == "kt_yamaava") {
96    $("#mp_frame").css({ height: "250px" });
97  } else if (expendable_target == "kt_pcb") {
98    $("#mp_frame").css({ height: "250px" });
99  } else if (expendable_target == "kt_pcb2") {
100    $("#mp_frame").css({ height: "250px" });
101  } else if (expendable_target == "kt_dave") {
102    $("#mp_frame").css({ height: "250px" });
103  } else if (expendable_target == "kt_ny2") {
104    $("#mp_frame").css({ height: "90px" });
105  } else if (expendable_target == "kt_ny3") {
106    $("#mp_frame").css({ height: "90px" });
107  } else if (expendable_target == "kt_ny4") {
108    $("#mp_frame").css({ height: "90px" });
109  } 
110  $(".banner_action").show();
111
112  $("#mp_video").hide();
113  $("#mp_btn_open").show();
114  $("#mp_btn_close").hide();
115  $("#mp_btn_speaker").hide();
116
117  $("#home_popup_frame").css("top", "500px");
118}
119
120function turningon_speaker() {
121  if (typeof yt_player === "object" && typeof yt_player !== "undefined" && yt_player != null) {
122    if (typeof yt_player.unMute === "function") {
123      yt_player.unMute();
124    }
125  }
126}
127
128function turningoff_speaker() {
129  if (typeof yt_player === "object" && typeof yt_player !== "undefined" && yt_player != null) {
130    if (typeof yt_player.mute === "function") {
131      yt_player.mute();
132    }
133  }
134}
135
136$(document).ready(function () {
137  // expendable 생성
138  if ($(".bn_728x90_1").find(".expendable").length > 0) {
139    expendable_target = $(".expendable").data("target");
140
141    if (expendable_target == "kt_kia") {
142      var background = "empty";
143      var imgsrc = "empty";
144      var banner_href = "";
145
146      videoid = "JCF7O1OEs7w";
147      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=70725&banner_url=https://www.kia.com/us/en/ev?utm_source=media_tenadv_2025_08_koreatimes&utm_medium=video_desktop_m_l1&utm_campaign=kia_ev9ev6&utm_content=ko";
148
149      var iframeBanner = ""; //안먹힘
150    } else if (expendable_target == "kt_smg") {
151      var background = "empty";
152      var imgsrc = "empty";
153      var banner_href = "";
154
155      videoid = "DBuLaZvlUDk";
156      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=825251&banner_url=http://pf.kakao.com/_IxkXen";
157
158      var iframeBanner = ""; //안먹힘
159    } else if (expendable_target == "kt_hyundai") {
160      var background = "empty";
161      var imgsrc = "empty";
162      var banner_href = "";
163
164      videoid = "P2QC8iXd8T4";
165      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=314241&banner_url=https://www.hyundaiusa.com/us/ko/vehicles/santa-fe?cmpid=tnad_ko_p1_kt_970x250&utm_source=kt&utm_medium=ko_banner";
166
167      var iframeBanner = ""; //안먹힘
168    } else if (expendable_target == "kt_hyundai2") {
169      var background = "empty";
170      var imgsrc = "empty";
171      var banner_href = "";
172
173      videoid = "RWiXTecktgI";
174      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=308261&banner_url=https://www.hyundaiusa.com/us/ko/fifa?cmpid=tnad_ko_wcnsn_kt_970x250&utm_source=kt&utm_medium=ko_banner";
175
176      var iframeBanner = ""; //안먹힘
177    } else if (expendable_target == "kt_pcb2") {
178      var background = "empty";
179      var imgsrc = "empty";
180      var banner_href = "";
181
182      videoid = "-TplNz3c3t8";
183      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=12623&banner_url=https://www.mypcbbank.com/?utm_source=ktla&utm_medium=video&utm_campaign=branding";
184
185      var iframeBanner = ""; //안먹힘
186    } else if (expendable_target == "kt_pcb") {
187      var background = "empty";
188      var imgsrc = "empty";
189      var banner_href = "";
190
191      const videoidArr = ["DDBpuCDdaSs",];
192      const ranId = videoidArr[Math.floor(Math.random() * videoidArr.length)];
193
194      videoid = ranId;
195      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=910261&banner_url=https://www.mypcbbank.com/?utm_source=ktla&utm_medium=banner&utm_campaign=2026branding&utm_content=ko";
196
197      var iframeBanner = ""; //안먹힘
198    } else if (expendable_target == "kt_hd2") {
199      var background = "empty";
200      var imgsrc = "empty";
201      var banner_href = "";
202
203      videoid = "";
204      var youtubelink = "";
205
206      var iframeBanner = ""; //안먹힘
207    } else if (expendable_target == "kt_dave") {
208      var background = "empty";
209      var imgsrc = "empty";
210      var banner_href = "";
211
212      videoid = "rM-K9meas8o";
213      var youtubelink = "http://service.koreatimes.com/lib/banner_action.php?&banner_id=T1&banner_ad_id=0929&banner_url=https://davemin.com/";
214
215      var iframeBanner = ""; //안먹힘
216    }
217
218    // 배너이미지
219    if (imgsrc != "empty") {
220      $("#mp_box").find(".mp_image_url").attr("href", banner_href);
221      $("#mp_box").find(".mp_image").attr("target", "koreatimes");
222      $("#mp_box").find(".mp_image").attr("src", imgsrc);
223      $("#mp_box").find("#mp_image_box").show();
224    }
225    // 유투브 백그라운드 이미지
226    if (background != "empty") {
227      $("#youtubeapi").css("background-image", background);
228    }
229
230    $(".mp_video_link").attr("href", youtubelink);
231
232    if (getCookie(expendable_target) == null || getCookie(expendable_target) == "") {
233      open_expendable(expendable_target);
234    } else {
235      close_expendable();
236    }
237  }
238
239  $(document).on("click", ".openexpendable", function () {
240    open_expendable();
241  });
242
243  $(document).on("click", ".closeexpendable", function () {
244    close_expendable();
245  });
246
247  $(document).on("click", ".turnon", function () {
248    $(this).hide();
249    $(this).next().show();
250    turningon_speaker();
251  });
252
253  $(document).on("click", ".turnoff", function () {
254    $(this).hide();
255    $(this).prev().show();
256    turningoff_speaker();
257  });
258
259  /* hanmi bank */
260  $(document).on("click", "#hanmi_btn_close .hanmi_250px", function () {
261    $(".hanmi_1").css("display", "block");
262    $(".hanmi_2").css("display", "none");
263    $("#hanmi_btn_close").css("display", "none");
264    $("#hanmi_btn_open").css("display", "block");
265  });
266
267  $(document).on("click", "#hanmi_btn_open .hanmi_500px", function () {
268    $(".hanmi_1").css("display", "none");
269    $(".hanmi_2").css("display", "block");
270    $("#hanmi_btn_close").css("display", "block");
271    $("#hanmi_btn_open").css("display", "none");
272  });
273});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.