TA的每日心情 | 慵懒 2020-10-8 02:33 |
---|
签到天数: 83 天 [LV.6]常住居民II
状元
- 积分
- 13465
|
本帖最后由 mmmc 于 2020-4-3 19:15 编辑
那可以解开 mdx 看有没有引用 js,或者直接试一下这个 JS:
- function oalecd8e_documentReady() {
- oalecd8e_extendJQuery();
- var a = {
- showInfl: 0,
- switchChinese: 0
- };
- for (var b in a) typeof window[b] == typeof a[b] && (a[b] = window[b]);
- 1 == a.showInfl ? oalecd8e_fixInfl() : oalecd8e.$(".infl").hide(), 1 == a.switchChinese ? (oalecd8e_switchChineseSetup(), oalecd8e_dblSetup(), oalecd8e.$(window).scroll()) : oalecd8e.$(".oalecd8e_show_all").hide()
- Array.prototype.filter.call(document.querySelectorAll('span.id, span.h'), function(e){
- var h = e.innerHTML;
- if (h.indexOf('·')) e.innerHTML = h.replace(/·/g,'');
- else if (h.indexOf('ˈ') >= 0) e.innerHTML = h.replace(/ˈ/g, '');
- });
- }
- function oalecd8e_fixInfl() {
- oalecd8e.$(".entry").each(function () {
- 0 == oalecd8e.$(this).find(".pos-g .Ref").length && (oalecd8e.$(this).find(".top-g>.infl,.top-g~.infl").insertAfter(oalecd8e.$(this).find(".h-g>.top-g>.ei-g")), oalecd8e.$(".infl+.infl").remove())
- })
- }
- function oalecd8e_dblSetup() {
- oalecd8e.$(".entry").off(".entry").on("click.entry", function (a) {
- oalecd8e.$(".n-g, .x-g, .sense-g, .para, .def-g").each(function () {
- if (oalecd8e.$(this).offset().top < a.pageY && oalecd8e.$(this).offset().top + oalecd8e.$(this).outerHeight() > a.pageY) {
- var b;
- if (oalecd8e.$(this).is(".n-g, .x-g, .sense-g, .para, .def-g")) {
- if (oalecd8e.$(a.target).filter(".sense-g, .n-g").children(".def-g").first().children(OxfordTagSwitchCNTAG).first().trigger("entry").length > 0) return !1;
- if (oalecd8e.$(a.target).filter(".x-g, .para, .def-g").first().children(OxfordTagSwitchCNTAG).first().trigger("entry").length > 0) return !1
- }
- return !1
- }
- })
- })
- }
- function oalecd8e_switchChineseSetup() {
- oalecd8e.$(".oalecd8e_chn").hide(), 0 != oalecd8e.$(".entry .oalecd8e_chn").length && (oalecd8e.$(".oalecd8e_show_all").off(".oalecd8e_lang").on("click.oalecd8e_lang", oalecd8e_switchChineseAll), oalecd8e.$(OxfordTagSwitchCNTAG).off(".oalecd8e_lang").on("click.oalecd8e_lang entry.oalecd8e_lang", oalecd8e_switchChinese).css("cursor", "pointer"))
- }
- function oalecd8e_switchChinese() {
- this !== oalecd8e_lastSwitchElement && (oalecd8e.$(this).is(OxfordTagSwitchCNSIBLINGS) ? (oalecd8e.$(this).siblings(OxfordTagChineseTexT).oalecd8e_toggle(), oalecd8e.$(this).children(OxfordTagSwitchCNSIBLINGS).oalecd8e_toggle()) : oalecd8e.$(this).children(OxfordTagChineseTexT).oalecd8e_toggle(), oalecd8e.$(window).scroll(), setTimeout(function () {
- oalecd8e_lastSwitchElement = null
- }, 200))
- }
- function oalecd8e_switchChineseAll() {
- 0 != oalecd8e.$(".oalecd8e_show_all.active").length ? (oalecd8e.$(".oalecd8e_show_all").removeClass("active"), oalecd8e.$(OxfordTagChineseTexT).oalecd8e_hide()) : (oalecd8e.$(".oalecd8e_show_all").addClass("active"), oalecd8e.$(OxfordTagChineseTexT).oalecd8e_show())
- }
- function oalecd8e_extendJQuery() {
- oalecd8e.$.fn.extend({
- oalecd8e_show: function () {
- return this.each(function () {
- void 0 === oalecd8e.$.fn.fadeIn ? oalecd8e.$(this).show() : "block" == oalecd8e.$(this).css("display") ? oalecd8e.$(this).fadeIn({
- duration: oalecd8e_slideDuration,
- queue: !1
- }).slideDown(oalecd8e_slideDuration) : oalecd8e.$(this).fadeIn({
- duration: oalecd8e_slideDuration
- })
- })
- },
- oalecd8e_hide: function () {
- return this.each(function () {
- void 0 === oalecd8e.$.fn.fadeOut ? oalecd8e.$(this).hide() : "block" == oalecd8e.$(this).css("display") ? oalecd8e.$(this).fadeOut({
- duration: oalecd8e_slideDuration,
- queue: !1
- }).slideUp(oalecd8e_slideDuration) : oalecd8e.$(this).fadeOut({
- duration: oalecd8e_slideDuration,
- queue: !1
- })
- })
- },
- oalecd8e_toggle: function (a) {
- return this.each(function () {
- (void 0 !== a ? a : !oalecd8e.$(this).is(":visible")) ? oalecd8e.$(this).oalecd8e_show(): oalecd8e.$(this).oalecd8e_hide()
- })
- },
- oalecd8e_slideToggle: function (a) {
- return this.each(function () {
- void 0 === oalecd8e.$.fn.slideToggle ? oalecd8e.$(this).toggle(a) : oalecd8e.$(this).slideToggle(a)
- })
- },
- oalecd8e_fadeIn: function (a) {
- return this.each(function () {
- void 0 === oalecd8e.$.fn.fadeIn ? oalecd8e.$(this).show(a) : oalecd8e.$(this).fadeIn(a)
- })
- },
- oalecd8e_fadeOut: function (a) {
- return this.each(function () {
- void 0 === oalecd8e.$.fn.fadeOut ? oalecd8e.$(this).hide(a) : oalecd8e.$(this).fadeOut(a)
- })
- }
- })
- }
- var oalecd8e = {};
- oalecd8e.$ = jQuery.noConflict(!0);
- const OxfordTagSwitchCN = ".oalecd8e_switch_lang",
- OxfordTagSwitchCNALL = ".oalecd8e_switch_lang.switch_all",
- OxfordTagSwitchCNCHILDREN = ".oalecd8e_switch_lang.switch_children",
- OxfordTagSwitchCNSIBLINGS = ".oalecd8e_switch_lang.switch_siblings",
- OxfordTagSwitchCNTAG = ".oalecd8e_switch_lang.switch_children, .oalecd8e_switch_lang.switch_siblings",
- OxfordTagChineseTexT = ".oalecd8e_chn";
- oalecd8e.$(oalecd8e_documentReady);
- var oalecd8e_pagetype = 0,
- oalecd8e_pageCount = 0,
- oalecd8e_lastdblSetupClick = null,
- oalecd8e_lastSwitchElement, oalecd8e_slideDuration = 300;
复制代码 |
|