c4console.min

15.06.2020, 06:31:18

目前为 2020-06-15 提交的版本。查看 最新版本

// ==UserScript==
// @name        c4console.min
// @namespace   Violentmonkey Scripts
// @match       *://*/*
// @exclude-match *://*.google.com*/*
// @grant       none
// @version     2.1
// @author      Tut 'UniBreakfast' Ninin
// @description 15.06.2020, 06:31:18
// ==/UserScript==
window.c=((...e)=>console.log(...e)||e.length>1?e:e[0]),Object.prototype.assign=function(...e){return Object.assign(this,...e)},console.img=((e,t=.4)=>{if(e.match(/^data:image\/.*;base64,/))return(new Image).assign({src:e,onload(){console.log("%c ",`padding:${this.height/2*t}px ${this.width/2*t}px;\n        background:url(${e}) no-repeat;font-size:1px;background-size:contain`)}});fetch(e).then(e=>e.blob()).then(e=>(new FileReader).assign({onload(){console.img(this.result,t)}}).readAsDataURL(e))});{let e;const t=()=>(new Date).toLocaleTimeString("en",{hour12:!1});Object.prototype.c=function(n){const o=t(),s=this.valueOf();return console.log(...o==e?[]:[e=o],..."string"==typeof n?[n+":"]:"number"==typeof n?[n+"."]:[],s),s},Promise.prototype.c=function(n){let o=e=>e,s=e=>e;const c=t(),a=new Date,i="response body",r=(t,o)=>{console.log(...c==e?[]:[e=c],..."string"==typeof n?[n+":"]:"number"==typeof n?[n+"."]:[],`${o} in ${new Date-a}ms`,t),"Response"==t.constructor.name&&200==t.status&&((t.headers.get("content-type")||'').startsWith("image/")?t.clone().blob().then(e=>(new FileReader).assign({onload(){"".c(i),console.img(this.result)}}).readAsDataURL(e)):t.clone().text().then(e=>{try{JSON.parse(e).c(i)}catch{e.c(i)}}))},l=this.then(e=>r(e,"resolved")||o(e),e=>r(e,"rejected")||s(e));return this.then=((e,t)=>(e&&(o=e),t&&(s=t),l)),this.catch=l.catch=(e=>(s=e)&&l),this}}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址