“MediaWiki:Common.js”的版本间的差异

来自帮助文档
跳转至: 导航搜索
 
(未显示同一用户的48个中间版本)
第1行: 第1行:
 
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
 
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
var vid = document.getElementById("vid");
+
  // 添加事件监听器
var myElement = document.getElementById("jkl");
+
$('#video').prepend('<video style="width:100%;height:100%"controls src="/768DM.mp4">')
var search = document.getElementById("topsearch");
 
  
$().ready( function() {
+
$('#MSG600').click(function(){
    //插入搜索框
+
        localStorage.clear();
    search.innerHTML = '<input type="text" id="myInput" placeholder="搜索" style="width: 100%;height: 100%; padding:0px 20px;border-radius: 2vw;">';
+
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=%E5%B8%AE%E5%8A%A9';  
     const minput = document.getElementById('myInput'); // 获取输入框元素
+
     });
    console.log(myInput)
+
$('#MSG500').click(function(){
    minput.addEventListener('keydown', function(event) {
+
        localStorage.clear();
          if (event.key === "Enter") {
+
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=%E5%BC%80%E5%B1%80%E6%8C%87%E5%AF%BC';
            // 按下回车键时执行的操作
+
       
              event.preventDefault(); // 阻止默认的提交行为
+
    });
              console.log("回车")
+
$('#FAQ').click(function(){
            // 在此处编写你希望执行的代码
+
        localStorage.clear();
              //if (minput.trim() === "") {
+
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=FAQ';
              //return;
+
       
              //}
+
    });
 
+
$('#Qlinkbailn').click(function(){
            var content = document.getElementById("bodyContent").innerText;
+
        localStorage.clear();
            var regex = new RegExp(minput , "gi");
+
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=Qlinkbailn';
            var match = content.match(regex);
+
       
 
+
    });
            if (match) {
+
$('#SMARTCT-E600').click(function(){
                var elements = document.getElementById("bodyContent")[0].querySelectorAll(":not(script):not(style)");
+
        localStorage.clear();
                Array.prototype.forEach.call(elements, function(element) {
+
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=SMARTCT-E600';
                    var text = element.textContent;
+
       
                    if (regex.test(text)) {
+
    });
                        var highlightedText = text.replace(regex, '<span class="highlight">$&</span>');
 
                        element.innerHTML = highlightedText;
 
                        element.scrollIntoView({ behavior: "smooth", block: "center" });
 
                    }
 
                });
 
            } else {
 
                alert("未找到匹配的文本");
 
            }
 
          }
 
        });
 
});
 
 
 
  // 添加事件监听器
 
  vid.addEventListener("click", function() {
 
    // 在点击事件发生时执行的代码
 
    // console.log("按钮被点击了!");
 
    myElement.innerHTML = '<video controls width="1280px" height="720px" class="item-video" src="http://39.107.81.77:9440/ilink-video/vd695.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20230815%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230815T104527Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&response-content-type=&X-Amz-Signature=d18aa5f56ba9ddd2bc7605abf6e62c56e5ff39f919c49adb1367551a7eb3f86d" </video>';
 
  });
 

2024年12月5日 (四) 17:12的最新版本

/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
  // 添加事件监听器
$('#video').prepend('<video style="width:100%;height:100%"controls src="/768DM.mp4">')

$('#MSG600').click(function(){
        localStorage.clear();
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=%E5%B8%AE%E5%8A%A9'; 
    });
$('#MSG500').click(function(){
        localStorage.clear();
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=%E5%BC%80%E5%B1%80%E6%8C%87%E5%AF%BC';
        
    });
$('#FAQ').click(function(){
        localStorage.clear();
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=FAQ';
        
    });
$('#Qlinkbailn').click(function(){
        localStorage.clear();
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=Qlinkbailn';
        
    });
$('#SMARTCT-E600').click(function(){
        localStorage.clear();
        window.location.href = 'http://help.qlinkcloud.club/index.php?title=SMARTCT-E600';
        
    });