提交
This commit is contained in:
2362
js/article.js
2362
js/article.js
File diff suppressed because it is too large
Load Diff
@@ -331,7 +331,7 @@ function bf_list() {
|
||||
|
||||
if (Jour_num == 2 || Jour_num == 17 | Jour_num == 18) {
|
||||
$('.current_list>h4').html('Current Volume<span>' + time_ + '</span>');
|
||||
} else if (Jour_num == 7 || Jour_num == 6 || Jour_num == 20 || Jour_num == 9 || Jour_num == 21 || Jour_num == 22) { // 合并期刊
|
||||
} else if (Jour_num == 7 || Jour_num == 6 || Jour_num == 20 || Jour_num == 9 || Jour_num == 21 || Jour_num == 22|| Jour_num == 19) { // 合并期刊
|
||||
$('.current_list>h4').html('Latest Issue<span>' + time_ + '</span>');
|
||||
} else {
|
||||
$('.current_list>h4').html('Current Issue<span>' + time_ + '</span>');
|
||||
@@ -1054,7 +1054,7 @@ function bf_list() {
|
||||
var str = "";
|
||||
for (var i = 0; i < result.data.journalStage.length; i++) {
|
||||
// 暂时条件中添加一个3 15 10
|
||||
if (Jour_num == 7 || Jour_num == 6 || Jour_num == 20 || Jour_num == 9 || Jour_num == 21 || Jour_num == 22 || Jour_num == 3 || Jour_num == 15 || Jour_num == 10|| Jour_num == 16|| Jour_num == 24) {
|
||||
if (Jour_num == 7 || Jour_num == 6 || Jour_num == 20 || Jour_num == 9 || Jour_num == 21 || Jour_num == 22 || Jour_num == 3 || Jour_num == 15 || Jour_num == 10|| Jour_num == 16|| Jour_num == 24|| Jour_num == 19) {
|
||||
// 合并(替换)期刊
|
||||
if (i == 0) { str += '<b>' + arr_stage[i].stage_year + '</b><br>' }
|
||||
|
||||
|
||||
32
js/js.js
32
js/js.js
@@ -50,6 +50,19 @@ var Jour_num = localStorage.Journals_num;
|
||||
|
||||
// tab选项卡
|
||||
$(document).ready(function () {
|
||||
// 检查 URL 是否包含参数 pre
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const isPre = urlParams.has('preview');
|
||||
|
||||
if (isPre) {
|
||||
// 页面带了 ?pre 参数,始终执行以下操作
|
||||
$(".left").css("width", "100%");
|
||||
$(".right").hide();
|
||||
}
|
||||
const element = document.querySelector('.act_chajian'); // 选择 .act_chajian 元素
|
||||
if (element) {
|
||||
element.remove(); // 删除该元素
|
||||
}
|
||||
$("#tablist li").each(function (index) {
|
||||
$(this).click(function () {
|
||||
console.log('this at line 54:', this);
|
||||
@@ -62,15 +75,15 @@ $(document).ready(function () {
|
||||
$(".content-box>div").eq(index).addClass("contentin");
|
||||
$(this).addClass("tabin");
|
||||
|
||||
// 判断当前点击的 <li> 是否具有 'tarhtmn' 类名
|
||||
if ($(this).hasClass('tarhtmn')) {
|
||||
// 设置当前点击的 <li> 宽度为 100%
|
||||
$(".left").css("width", "100%");
|
||||
$(".right").hide(); // 隐藏 .right 标签
|
||||
} else {
|
||||
// 移除当前点击的 <li> 宽度样式
|
||||
$(".left").css("width", "");
|
||||
$(".right").show(); // 恢复显示 .right 标签
|
||||
// 如果不包含 pre 参数,才根据点击项控制显示逻辑
|
||||
if (!isPre) {
|
||||
if ($(this).hasClass('tarhtmn')) {
|
||||
$(".left").css("width", "100%");
|
||||
$(".right").hide();
|
||||
} else {
|
||||
$(".left").css("width", "");
|
||||
$(".right").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -79,6 +92,7 @@ $(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
|
||||
//返回顶部
|
||||
$.goup({
|
||||
trigger: 100,
|
||||
|
||||
@@ -106,7 +106,7 @@ function initOid() {
|
||||
str += `
|
||||
|
||||
<li>
|
||||
<div class="dbt_header">${arr[i].type}${baseInfo.pub_date}</div><a id="${arr[i].article_id}" target="_blank"
|
||||
<div class="dbt_header" style="height: 37px;line-height: 32px;">${arr[i].type}${baseInfo.pub_date}<div class="url_top">${baseInfo.lr_top}</div></div><a id="${arr[i].article_id}" target="_blank"
|
||||
href="article.html?J_num=${arr[i].journal_id}&a_id=${arr[i].article_id}"
|
||||
class="txt_biaoti">${baseInfo.otStat}${arr[i].title}</a>
|
||||
<div class="authorList">${arr[i].authortitle}<br>
|
||||
@@ -124,7 +124,47 @@ function initOid() {
|
||||
$('.wenz_list>ul').html(str);
|
||||
$('.links_ .txt_copy').css('background', localStorage.Journals_color);
|
||||
commonHandleClickHtml()
|
||||
addStyleToElement();
|
||||
}
|
||||
function addStyleToElement() {
|
||||
// 获取所有具有 .url_top 类的元素
|
||||
var elements = document.querySelectorAll('.article .art_main .new_art > ul li .url_top');
|
||||
|
||||
elements.forEach(function(element) {
|
||||
element.style.margin = '0 0 0 20px';
|
||||
element.style.display = 'inline-block';
|
||||
});
|
||||
|
||||
// 获取所有具有 .url_top a 类的元素
|
||||
var links = document.querySelectorAll('.article .art_main .new_art > ul li .url_top a');
|
||||
|
||||
links.forEach(function(link) {
|
||||
link.style.marginRight = '10px';
|
||||
link.style.padding = '3px 0';
|
||||
link.style.fontFamily = 'Calibri';
|
||||
link.style.fontSize = '15px';
|
||||
});
|
||||
|
||||
// 设置最后一个 a 元素的 margin-right 为 0
|
||||
var lastLink = document.querySelector('.article .art_main .new_art > ul li .url_top a:last-child');
|
||||
if (lastLink) {
|
||||
lastLink.style.marginRight = '0';
|
||||
}
|
||||
|
||||
// 为 a 元素添加 hover 效果
|
||||
links.forEach(function(link) {
|
||||
link.addEventListener('mouseenter', function() {
|
||||
link.style.textDecoration = 'underline';
|
||||
});
|
||||
link.addEventListener('mouseleave', function() {
|
||||
link.style.textDecoration = 'none';
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 调用函数将样式应用到元素
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
17
js/side.js
17
js/side.js
@@ -125,13 +125,26 @@ function side_list() {
|
||||
$('.ncon_SCom > div > div:nth-child(4) > p> b').html(arr_jour.title)
|
||||
|
||||
if (arr_jour.title == 'Traditional Medicine Research') {
|
||||
$('.nav_ban h2').html('<img src="../img/h2_tit.png" style="margin-top: 26px;"/>');
|
||||
$('.nav_ban h2').html('<img src="../img/h2_tit.png" style=""/>');
|
||||
$('.sharethis_tmr').css('display', 'none');
|
||||
$('.art_top_topic').css('padding-top', '0');
|
||||
$('.line_sbil').css('display', 'block');
|
||||
// $('.jour_message>div').append('<p style="margin-top: 5px;"><b>E-Mail Address:</b> <br/><span>tmr@tmrjournals.com</span></p>');
|
||||
$('.topic_add').addClass('topic_add_tmr');
|
||||
$('.share_tmrtb').css('display', 'block');
|
||||
} else if (arr_jour.title == 'Cancer Advances') {
|
||||
|
||||
$('.nav_ban h2').html('<a href="http://www.caca.org.cn/qkzz/xlqk/index.shtml" target="_blank" style="height:100%;display:flex;align-items:center;justify-content:center;"><img src="../img/h3_tit_new.png" style="height:36px;"></a>');
|
||||
$('.nav_ban h2').css({
|
||||
'display': 'flex !important',
|
||||
'align-items': 'center',
|
||||
'justify-content': 'center',
|
||||
'height': '62px'
|
||||
});
|
||||
;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$('.tmr_side_book').css('display', 'none');
|
||||
//2,125,186,108,177,64,88,391,
|
||||
@@ -324,7 +337,7 @@ function side_list() {
|
||||
const Submission_tmr_back_bot = artSide.querySelector('.Submission_tmr_back_bot');
|
||||
if (Submission_tmr_back_bot) {
|
||||
Submission.classList.remove('hidden');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user