// ==UserScript== // @name 京东加评测视频 // @namespace add_review // @version 0.1 // @description 在京东的产品页面上加上评测视频,目前只支持B站视频。 // @author clvin // @match http*://item.jd.com/* // @match http*://search.bilibili.com/all?vflag=1&* // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @run-at document-end // @downloadURL none // ==/UserScript== (function() { var cf = 1; function loadSheet() { var sheet = ` /* 评测视频iframe展示的样式 */ .video-iframe { border: 0px; margin: 0px !important; width: 100% !important; height: 230px !important; } /* 搜索关键字iframe的样式 */ .keyword{ text-align:center; } `; var css = document.createElement('style'); css.type = 'text/css'; css.id = 'multi-search-css'; css.textContent = sheet; document.getElementsByTagName('head')[0].appendChild(css); } function getkeyword() { var keyword = ""; var akeyw = "" $("#detail > div.tab-con > div:nth-child(1) > div.p-parameter > ul.parameter2.p-parameter-list > li").each(function () { var txtLI = $(this).text(); var ts = ""; if (txtLI.startsWith("商品名称")) { ts=txtLI.split(":"); ts = ts[1].split(" "); keyword = ts[0]; akeyw = ""+keyword+" "; $("#keyw").append(akeyw); } else if (txtLI.indexOf("类型")>-1) { ts=txtLI.split(":"); ts = ts[1].split(","); keyword = ts[0]; akeyw = ""+keyword+" "; $("#keyw").append(akeyw); } else if (txtLI.startsWith("材质")) { ts=txtLI.split(":"); ts = ts[1].split(","); keyword = ts[0]; akeyw = ""+keyword+" "; $("#keyw").append(akeyw); } }); return keyword; } if (window.location.host == "search.bilibili.com") { $("#internationalHeader").remove(); $("#server-search-app > div > div.head-contain").remove(); $("#all-list > div.flow-loader > div.filter-wrap").remove(); $("#bili-search > div.international-footer").remove(); $("#server-search-app > div > div.rocket-con").remove(); $("#all-list > div.flow-loader > div.page-wrap").remove(); $("#all-list > div.flow-loader > ul > li:gt(4)").remove(); } loadSheet(); var div_html = '