PageSourceSearch

https://www.tmrjournals.com/js/scientist/index.js

js tmrjournals.com collected 2026-10-02 05:08:28 UTC 15,874 bytes, 350 lines download raw bytes

1function getQueryString(key) {
2    // 获取参数
3    var url = window.location.search;
4    // 正则筛选地址栏
5    var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
6    // 匹配目标参数
7    var result = url.substr(1).match(reg);
8    //返回参数值
9    return result ? decodeURIComponent(result[2]) : null;
10}
11function commonGetAxiosData(url, type, data) {
12    var resultData;
13    $.ajax({
14        type: type,
15        url: apiUrl + url,
16        data: data,
17    }).then((result) => {
18        if (result.code == 0) {
19            resultData = result.data
20        } else {
21            ShowDanger("请求失败!");
22            resultData = null
23        }
24    })
25    return resultData;
26}
27function commonInit() {
28    $('.art_main_con').append('<div id="kkpager"></div>')
29    $('.wenz_list').append('<div style="font-size: 12px;text-align: right;padding-top: 10px;padding-right: 27px;" class="gue_chinese_tot">all total <b class="tioashu"></b> </div>')
30
31
32
33}
34function commonGetItemHtml(doc, maxwidth) {
35
36    var data = doc.data; var journal_id = doc.data.journal_id ? doc.data.journal_id : Jour_num;
37   
38    var i = doc.i;
39    var img_i = doc.img_i;
40    var c_t_a = doc.c_t_a;
41    var tong_geogle = doc.tong_geogle;
42   
43    var baseInfo = {
44        doi_: !data.doi ? '' : `https://doi.org/${data.doi}`,
45        npp_: data.npp == '' || data.npp == ' ' ? '' : `:&nbsp;${data.npp}.&nbsp;&nbsp;`,
46        html_: '',
47        otStat: '',
48        pub_date: '',
49        mp4_: data.article_id != '172' ? '' : `<a href="https://youtu.be/3eDbnHRkFKQ" target="_blank"><img src="img/link_5.png" width="50" height="16" style="margin-left: 10px"></a>`,
50        c_t_a: '',
51        trad_tion: '',
52        lr_top: '',
53        person_img: '',
54        tong_geogle: tong_geogle ? tong_geogle : '',
55        pdf_: !data.file_pdf || data.file_pdf == '' ? '' : `<img src="img/link_3.jpg" width="14" height="16"><a href="${imgFileUrl}articlePDF/${data.file_pdf}" target="_blank" class="txt_pdf" alt="${data.article_id}">PDF</a>&nbsp;(&nbsp;<span style="color: red">${data.pdf_num}</span>&nbsp;)`,
56        cite_: !data.cite_num || data.cite_num == 0 ? '' :
57            `&nbsp;<span article_id="${data.article_id}" class="cite_box" style="color: #7a2702;">
58            <img src="img/link_6.jpg" width="14" height="16">
59            WOS Citations&nbsp;(&nbsp;<span style="color: red">${data.cite_num}</span>&nbsp;)
60            <ul class="export_cite "> </ul>
61        </span>`,
62        abstract: data.abstract ? data.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153") : '',
63        link_: '',
64        stage_: '',
65    }
66
67    if (data.has_html == 0) {
68        if (data.file_html == '') {
69            baseInfo.html_ = ''
70        } else {
71            baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + data.file_html + '" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;'
72        }
73    } else {
74        baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="article.html?J_num=' + journal_id + '&a_id=' + data.article_id + '&s_htm=1" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;'
75    }
76    // if (data.mains == '') {
77    //     if (data.file_html == '') {
78    //         baseInfo.html_ = ''
79    //     } else {
80    //         baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + data.file_html + '" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;'
81    //     }
82    // } else {
83    //     baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="article.html?J_num=' + Jour_num + '&a_id=' + data.article_id + '&s_htm=1" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;'
84    // }
85
86
87    if (data.stage_no == '0') {
88        baseInfo.stage_ = ''
89    } else {
90        baseInfo.stage_ = '&nbsp;(' + data.stage_no + ')'
91    }
92    if (data.other_state == 0) {
93        baseInfo.otStat = ''
94    } else if (data.other_state == 1) {
95        baseInfo.otStat = '<span class="otStat">Editorial Expression of Concern</span>'
96    } else if (data.other_state == 2) {
97        baseInfo.otStat = '<span class="otStat">Retracted</span>'
98    }
99    if (data.isShowOtime == 1) {
100        if (data.pub_date && data.pub_date != '') {
101            baseInfo.pub_date = `<div class="url_data">Published Date: ${data.pub_date}</div>`
102        }
103    }
104
105    if (data.article_id == '86' || data.article_id == '176' || data.article_id == '455' || data.article_id == '400' || data.article_id == '145' || data.article_id == '116' || data.article_id == '717' || data.article_id == '632' || data.article_id == '24') {
106        baseInfo.person_img = '<img src="' + img_i + '" alt="" style="width: 120px">'
107    } else {
108        baseInfo.person_img = '<img src="' + img_i + '" alt="">'
109    }
110    if (c_t_a == 'different') {
111        if (data.journal_id == 22) {
112            baseInfo.c_t_a = '<button class="txt_copy cite_txt_button" >&nbsp;<img src="img/link_7.jpg" width="14" height="16">引用这篇文章<ul class="export" style="z-index:10;"><li id="txt_copy_' + i + '" class="Exc_1">>> 复制引用信息</li><li class="Exc_2"><i class="fa fa-download"></i> 下载EndNote格式</li><li class="Exc_3"><i class="fa fa-download"></i> 下载RIS格式</li><li class="Exc_4"><i class="fa fa-download"></i> 下载BibTex格式</li><li class="Exc_5"><i class="fa fa-download"></i> 下载text格式</li><div class="triangle"></div></ul></button>'
113        } else {
114            baseInfo.c_t_a = '<button class="txt_copy cite_txt_button">&nbsp;<img src="img/link_7.jpg" width="14" height="16">Cite this article<ul class="export" style="z-index:10;"><li id="txt_copy_' + i + '" class="Exc_1">>> Copy citation information</li><li class="Exc_2"><i class="fa fa-download"></i> Export citation to EndNote</li><li class="Exc_3"><i class="fa fa-download"></i> Export citation to RIS</li><li class="Exc_4"><i class="fa fa-download"></i> Export citation to BibTex</li><li class="Exc_5"><i class="fa fa-download"></i> Export citation to txt</li><div class="triangle"></div></ul></button>'
115        }
116    } else {
117        baseInfo.c_t_a = '<button class="txt_copy cite_txt_button">&nbsp;<img src="img/link_7.jpg" width="14" height="16">Cite this article<ul class="export" style="z-index:10;"><li id="txt_copy_' + i + '" class="Exc_1">>> Copy citation information</li><li class="Exc_2"><i class="fa fa-download"></i> Export citation to EndNote</li><li class="Exc_3"><i class="fa fa-download"></i> Export citation to RIS</li><li class="Exc_4"><i class="fa fa-download"></i> Export citation to BibTex</li><li class="Exc_5"><i class="fa fa-download"></i> Export citation to txt</li><div class="triangle"></div></ul></button>'
118
119    }
120
121
122    baseInfo.link_ = `<img src="img/link_1.png" width="14" height="16"><a class="txt_zhaiyao" alt="${data.article_id}">Abstract</a>&nbsp;(&nbsp;<span style="color: red">${data.abs_num}</span>&nbsp;)&nbsp;&nbsp;&nbsp;${baseInfo.html_}${baseInfo.pdf_}${baseInfo.mp4_}${baseInfo.c_t_a}${baseInfo.cite_}${baseInfo.tong_geogle}
123        <p class="txt_content">${data.cite}</p><div>${data.abstract}</div>`;
124
125
126
127    if (data.tradition_tag == '' || data.tradition_tag == null) {
128        var maxwidth = maxwidth ? maxwidth : 800;//显示多少字符
129        if (data.abstract && data.abstract.length > maxwidth) {
130            var abstNew = data.abstract.replace(/<.*?>/ig, "")
131            abstNew = abstNew.substring(0, maxwidth)
132            abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
133            baseInfo.trad_tion = '<div>' + abstNew + '...</div>'
134        } else {
135            baseInfo.trad_tion = '<div>' + data.abstract ? data.abstract : '' + '</div>'
136        }
137    } else {
138        baseInfo.trad_tion = '<div><h3>' + data.tradition_tag + '</h3><p>' + data.tradition + '</p></div>'
139    }
140
141    if (data.topic && data.topic.length > 0) {
142        for (var t = 0; t < data.topic.length; t++) {
143            baseInfo.lr_top += '<a href="topic_list.html?J_num=' + Jour_num + '&t_id=' + data.topic[t].journal_topic_id + '" target="_blank">' + data.topic[t].title + '</a>'
144        }
145    }
146
147
148
149    return baseInfo
150}
151
152function commonHandleClickHtml() {
153
154    // 点击Abstract显示隐藏
155    $('.txt_zhaiyao').click(function () {
156        $(this).nextAll('div').toggle();
157        if ($(this).nextAll('div').css("display") == 'block') {
158            var num = $(this).next().html();
159            $.ajax({
160                type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
161                data: { "article_id": $(this).attr('alt'), "type": 'abs' },
162                success: function (result) {
163                    if (result.code == 0) {
164                        num = num * 1 + 1 * 1
165                    }
166                }
167            })
168            $.ajax({
169                type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
170                data: { 'type': Jour_num, 'is_detail': '1' },
171                success: function (result) {
172                }
173            });
174            $(this).next().html(num);
175        }
176    })
177    $('.txt_html').click(function () {
178        var num = $(this).next().html();
179        $.ajax({
180            type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
181            data: { "article_id": $(this).attr('alt'), "type": 'html' },
182            success: function (result) {
183                if (result.code == 0) {
184                    num = num * 1 + 1 * 1
185                }
186            }
187        })
188        $.ajax({
189            type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
190            data: { 'type': Jour_num, 'is_detail': '1' },
191            success: function (result) {
192            }
193        });
194        $(this).next().html(num);
195    })
196    $('.txt_pdf').click(function () {
197        var num = $(this).next().html();
198        $.ajax({
199            type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
200            data: { "article_id": $(this).attr('alt'), "type": 'pdf' },
201            success: function (result) {
202                if (result.code == 0) {
203                    num = num * 1 + 1 * 1
204                }
205            }
206        })
207        $.ajax({
208            type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
209            data: { 'type': Jour_num, 'is_detail': '1' },
210            success: function (result) {
211            }
212        });
213        $(this).next().html(num);
214    })
215
216    $('.export_cite').css('display', 'none');
217    $(document).click(function (e) {
218        if (!$(e.target).is('.export_cite') && !$(e.target).is('.cite_box')) {
219            $('.export_cite').hide();
220        }
221    })
222    $('.cite_box').click(function () {
223        $('.export_cite').css('display', 'none');
224        commonGetCiteList($(this).attr('article_id'))
225        $(this).find('.export_cite').fadeIn(200);
226    })
227    $('.export_cite').click(function (e) { e.stopPropagation() })
228
229    // 点击弹窗出现 复制和下载
230    $('.txt_content').css('display', 'none');
231    $('.export').css('display', 'none');
232    $(document).click(function (e) {
233        if (!$(e.target).is('.export') && !$(e.target).is('.txt_copy')) {
234            $('.export').hide();
235        }
236    })
237    $('.txt_copy').click(function () {
238        $('.export').css('display', 'none');
239        $(this).find('.export').fadeIn(200);
240    })
241    $('.Exc_1').click(function () {
242        var content_ = $(this).parents('.txt_copy').nextAll('.txt_content').text();
243        var clipboard = new Clipboard('#' + $(this).attr('id'), {
244            text: function () {
245                return content_;
246            }
247        })
248        clipboard.on('success', function (e) {
249            ShowSuccess("Citation information has been copied!");
250        });
251    })
252    $('.Exc_2').click(function () {
253        var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
254        $.ajax({
255            type: 'post', url: apiUrl + 'api/Article/getArticleenw', async: false,
256            data: { "article_id": ecx_id },
257            success: function (result) {
258                var a = document.createElement('a');
259                a.href = result.data.url;
260                a.download = ''
261                a.click();
262            }
263        })
264    })
265    $('.Exc_3').click(function () {
266        var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
267        $.ajax({
268            type: 'post', url: apiUrl + 'api/Article/getArticleRis', async: false,
269            data: { "article_id": ecx_id },
270            success: function (result) {
271                var a = document.createElement('a');
272                a.href = result.data.url;
273                a.download = ''
274                a.click();
275            }
276        })
277    })
278    $('.Exc_4').click(function () {
279        var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
280        $.ajax({
281            type: 'post', url: apiUrl + 'api/Article/getArticlebib', async: false,
282            data: { "article_id": ecx_id },
283            success: function (result) {
284                var a = document.createElement('a');
285                a.href = result.data.url;
286                a.download = ''
287                a.click();
288            }
289        })
290    })
291    $('.Exc_5').click(function () {
292        var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
293        $.ajax({
294            type: 'post', url: apiUrl + 'api/Article/getArticletext', async: false,
295            data: { "article_id": ecx_id },
296            success: function (result) {
297                var a = document.createElement('a');
298                a.href = result.data.url;
299                a.download = ''
300                a.click();
301            }
302        })
303    })
304}
305//获取 cite 并添加 html 
306function commonGetCiteList(a_ID) {
307    $('.cite_box .export_cite').html('<div class="loader-01"></div>');
308    var journalCiteStr = ''
309    $.ajax({
310        type: 'post', url: apiUrl + 'api/Article/getArticleCites',
311        data: {
312            "article_id": a_ID
313        },
314        success: function (result) {
315            if (result.code == 0) {
316
317                var arr = result.data.list
318                for (let i in arr) {
319                    journalCiteStr += `
320                    <div class='cite_list_item' style="margin-bottom:10px;podding:10px 0;display:flex;border-bottom: ${i != arr.length - 1 ? '1px solid #ccc' : 'none'};}"><p style="margin-right:10px;">${Number(i) + 1}.</p>
321                <div>          
322                <p style="display: block; line-height: 20px;
323                font-size: 13px;
324                margin-bottom: 3px;"> <a style="color:#205493 !important;" 
325                    target="_blank"
326                    href="${arr[i].doi ? 'https://doi.org/' + arr[i].doi : ''}">
327                    ${arr[i].article_name}
328                    </a></p>
329                
330                <p style="line-height: 14px;margin-bottom: 10px;">
331                <span style="color: #a2b1b6;
332                font-size: 13px;">${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''}
333                </span>
334                <span style="margin-left:5px;color:#205493 !important;">
335                 </span></p></div>
336                
337                  </div> `
338                }
339                journalCiteStr += ` <div class="cite_triangle"></div>`
340
341                $('.cite_box .export_cite').html(journalCiteStr);
342
343
344
345
346
347            }
348        }
349    })
350}

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.