// ==UserScript== // @name 必应搜索双栏显示 // @namespace http://tampermonkey.net/ // @version 0.1.1 // @description 双栏显示必应搜索结果 // @include *://*.bing.com/search?* // @author Mr.NullNull // @downloadURL https://update.greasyfork.icu/scripts/384310/%E5%BF%85%E5%BA%94%E6%90%9C%E7%B4%A2%E5%8F%8C%E6%A0%8F%E6%98%BE%E7%A4%BA.user.js // @updateURL https://update.greasyfork.icu/scripts/384310/%E5%BF%85%E5%BA%94%E6%90%9C%E7%B4%A2%E5%8F%8C%E6%A0%8F%E6%98%BE%E7%A4%BA.meta.js // ==/UserScript== (function () { 'use strict'; Main(); function Main() { document.querySelector("#b_results").setAttribute("class", "listOld"); document.querySelector("div#b_content > main").innerHTML += '
        '; document.querySelector("head").innerHTML += ` `; let list = document.querySelectorAll("#b_results > .b_algo, #b_results > .b_ans"); var listA = document.querySelector(".listA"); var listB = document.querySelector(".listB"); for (let i = 0; i < list.length; i++) { const element = list[i]; console.log(element.innerHTML); if (element.querySelector(".b_rs") == null && element.innerHTML != "") { if (parseInt(listA.offsetHeight) <= parseInt(listB.offsetHeight)) { listA.appendChild(element); } else { listB.appendChild(element); } } } //移动页码 document.querySelector("#b_content > main").appendChild(document.querySelector("#b_results > .b_pag")); } })();