PageSourceSearch

https://taishinart.org.tw/js/coder/page/lang.js

js taishinart.org.tw collected 2026-10-02 05:53:15 UTC 1,122 bytes, 34 lines download raw bytes

1$(document).ready(function () {
2    $(document).on("click","a.my_lang",function(){
3        var lang = $(this).attr("lang");
4        var current_lang = nowlang;
5
6        if(current_lang != lang) {
7
8            $.ajax({
9                method: 'get',
10                url: weburl_api + 'api/cookie/change/'+lang,
11                dataType: 'json',
12                async: true,
13            }).done(function (res) {
14                const {retResult, retMsg, data} = res;
15                if (retResult) {
16                    var script_name= (document.location.pathname.match(/[^\/]+$/)!=null)?document.location.pathname.match(/[^\/]+$/)[0]:'';
17                    var search= document.location.search;
18                    //location.reload();
19
20                    var href_lang = (lang=='zh-cht'?'':lang+'/');
21                    //location.href = weburl+href_lang+script_name+search;
22                    location.href = weburl+href_lang;
23                }else{
24                    alert(retMsg);
25                }
26            }).fail(function (error) {
27
28            });
29
30        }
31
32
33    });
34});

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.