您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2022/8/3 08:33:33
当前为
// ==UserScript== // @name 调整打印文件 // @namespace print adjust // @match https://ctbpsp.com/#/bulletinDetail?uuid=* // @match https://bulletin.cebpubservice.com/qualifyBulletin/* // @match https://bulletin.cebpubservice.com/biddingBulletin/* // @match https://bulletin.cebpubservice.com/candidateBulletin/* // @match https://bulletin.cebpubservice.com/resultBulletin/* // @run-at document-end // @grant unsafeWindow // @version 1.2.1 // @author 我爱小熊啊 // @description 2022/8/3 08:33:33 // @description 中国招标投标公共服务平台公告文件打印调整 // @description 增加对 cebpubservice.com的支持 // @description 自动隐藏 cebpubservice.com 上的二维码广告 // @license MIT // ==/UserScript== // 设置延时定时器,避免网页未加载完,弹出页码输入框 setTimeout(function(){ var weburl = window.location.href; var n = 1; // ctbpsp.com 网页打印 if(weburl.indexOf('ctbpsp.com')!=-1){ // var windowAttribute = $('iframe'); ??? 引入 jQuery 库也不生效 var windowAttribute = document.getElementsByTagName('iframe')[0]; n = prompt('请输入文件页码',''); if(n){ // 如果输入框点击取消,则 prompt 返回的是 null,则取消更改,否则网页会出错 windowAttribute.width = 900; windowAttribute.height = 1150 * n; // alert("Hello"); } } // cebpubservice.com 网页打印 if(weburl.indexOf('cebpubservice.com')!=-1){ var p = document.getElementsByClassName('pdf_wraper')[0]; var b = document.getElementsByClassName('PublicAddress')[0]; b.style.display = 'none'; // var n = prompt('请输入文件页码',''); n = prompt('请输入文件页码',''); if(n){ p.style.width = '900px'; var h = n * 1150; var gaodu = h + 'px'; p.style.height = gaodu; } } }, 5800); // window.onload = function () { // // 加载时获取 // var a = document.getElementsByTagName('select')[0]; // console.info(a); // }