console.log & front-end jobs
console.log & front-end jobs
bind & function
let log = console.log;
let obj = {};
log(obj);
log(typeof Function.prototype.bind);
log(typeof Function.prototype.bind());
log(Function.prototype.bind.name);
log(Function.prototype.bind().name);
//{}
//function
//function
//bind
//bound
Function.prototype;
//ƒ () { [native code] }
Function.prototype.bind;
//ƒ bind() { [native code] }
Function.prototype.bind();
//ƒ () { [native code] }
Function.prototype.bind.name;
//"bind"
Function.prototype.bind().name;
// "bound "
https://zhuanlan.zhihu.com/p/50539121
vanilla js customize bind this
"use strict";
/**
*
* @author xgqfrms
* @license MIT
* @copyright xgqfrms
* @created 2019-08-31
* @modified
*
* @description vanilla js customize bind this
* @augments
* @example
* @link
*
*/
let log = console.log;
let obj = {
x: 42,
getX: function() {
log(`this =`, this);
log(`obj.x =`, obj.x);
return this.x;
}
};
// The function gets invoked at the global scope
let unboundGetX = obj.getX;
// log(unboundGetX());
// undefined
let boundGetX = unboundGetX.bind(obj);
// log(boundGetX());
// 42
Function.prototype.customizeBind = function() {
let func = this;
let _this = arguments[0];
// arguments is array-like, not an array!
// let args = Array.prototype.slice.apply(arguments,[1]);
let args = [...arguments].slice(1);
// log(`func =`, func);
// log(`_this =`, _this);
// log(`args =`, args);
if (typeof func === "function") {
return function() {
let allArgs = args.concat([...arguments].slice(0));
// log(`allArgs =`, allArgs);
return func.apply(_this, allArgs);
};
} else {
throw new Error(`Function.prototype.customizeBind - what is you trying to be bound is not callable!`);
}
};
let customizeBoundGetX = unboundGetX.customizeBind(obj);
log(customizeBoundGetX());
AliPay
!function(o) {
function e(s) {
if (t[s])
return t[s].exports;
var i = t[s] = {
exports: {},
id: s,
loaded: !1
};
return o[s].call(i.exports, i, i.exports, e),
i.loaded = !0,
i.exports
}
var t = {};
return e.m = o,
e.c = t,
e.p = "",
e(0)
}([function(o, e) {
"use strict";
!function() {
var o = void 0;
if (window.console && "undefined" != typeof console.log) {
try {
(window.parent.__has_console_security_message || window.top.__has_console_security_message) && (o = !0)
} catch (e) {
o = !0
}
if (window.__has_console_security_message || o)
return;
var e = "\u6e29\u99a8\u63d0\u793a\uff1a\u8bf7\u4e0d\u8981\u8c03\u76ae\u5730\u5728\u6b64\u7c98\u8d34\u6267\u884c\u4efb\u4f55\u5185\u5bb9\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u60a8\u7684\u8d26\u6237\u53d7\u5230\u653b\u51fb\uff0c\u7ed9\u60a8\u5e26\u6765\u635f\u5931 \uff01^_^"
, t = "\u4e3a\u4e16\u754c\u5e26\u6765\u5fae\u5c0f\u800c\u7f8e\u597d\u7684\u6539\u53d8\u3002\u6b22\u8fce\u52a0\u5165\u652f\u4ed8\u5b9d\uff1a"
, s = "https://job.alibaba.com/zhaopin/position_detail.htm?positionId=41641"
, i = [t, " ", s].join("");
/msie/gi.test(navigator.userAgent) ? (console.log(e),
console.log(i)) : (console.log("%c AliPay %c Copyright \xa9 2004-%s", 'font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:64px;color:#00bbee;-webkit-text-fill-color:#00bbee;-webkit-text-stroke: 1px #00bbee;', "font-size:12px;color:#999999;", (new Date).getFullYear()),
console.log("%c " + e, "color:#333;font-size:16px;"),
console.log("\n " + i)),
window.__has_console_security_message = !0
}
}()
}
]);
AliPay Copyright © 2004-2021
温馨提示:请不要调皮地在此粘贴执行任何内容,这可能会导致您的账户受到攻击,给您带来损失 !_
为世界带来微小而美好的改变。欢迎加入支付宝: https://job.alibaba.com/zhaopin/position_detail.htm?positionId=41641
Alloyteam
http://www.alloyteam.com/2020/01/14184/#prettyPhoto
// Alloyteam 招聘广告
window.console && console.log && console.log("\n"+" _ _ _ _____ \n \/_\\ | || | ___ _ _ \/__ \\ ___ __ _ _ __ ___ \n \/\/_\\\\ | || | \/ _ \\ | | | | \/ \/\\\/ \/ _ \\ \/ _` || '_ ` _ \\ \n\/ _ \\| || || (_) || |_| | \/ \/ | __\/| (_| || | | | | |\n\\_\/ \\_\/|_||_| \\___\/ \\__, | \\\/ \\___| \\__,_||_| |_| |_|\n |___\/\n\n 欢迎加入AlloyTeam:请将简历(邮件标题后面再加上'from console')发送至 %c Kinvix@QQ.com \n", "color:red");
警告!
使用此控制台可能会给攻击者可乘之机,让其利用 Self-XSS(自跨站脚本)攻击来冒充您并窃取您的信息。请勿输入或粘贴来历不明的代码。
, Xca = function(a, b) {
var c = function() {
if (a.isDisposed())
return b.apply(this, arguments);
try {
return b.apply(this, arguments)
} catch (d) {
Un(a, d)
}
};
c[Tn(a, !1)] = b;
return c
}
ASCII text art
console.log(`%c
_____ _______ _____ _____ _____ _____
______ /\ \ /::\ \ /\ \ /\ \ /\ \ /\ \
|::| | /::\ \ /::::\ \ /::\ \ /::\ \ /::\____\ /::\ \
|::| | /::::\ \ /::::::\ \ /::::\ \ /::::\ \ /::::| | /::::\ \
|::| | /::::::\ \ /::::::::\ \ /::::::\ \ /::::::\ \ /:::::| | /::::::\ \
|::| | /:::/\:::\ \ /:::/~~\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /::::::| | /:::/\:::\ \
|::| | /:::/ \:::\ \ /:::/ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/|::| | /:::/__\:::\ \
|::| | /:::/ \:::\ \ /:::/ / \:::\ \ /::::\ \:::\ \ /::::\ \:::\ \ /:::/ |::| | \:::\ \:::\ \
|::| | /:::/ / \:::\ \ /:::/____/ \:::\____\ /::::::\ \:::\ \ /::::::\ \:::\ \ /:::/ |::|___|______ ___\:::\ \:::\ \
______|::|___|___ ____ /:::/ / \:::\ ___\ |:::| | |:::| | /:::/\:::\ \:::\ \ /:::/\:::\ \:::\____\ /:::/ |::::::::\ \ /\ \:::\ \:::\ \
|:::::::::::::::::| |/:::/____/ ___\:::| ||:::|____| |:::|____|/:::/ \:::\ \:::\____\/:::/ \:::\ \:::| |/:::/ |:::::::::\____\/::\ \:::\ \:::\____\
|:::::::::::::::::|____|\:::\ \ /\ /:::|____| \:::\ _\___/:::/ / \::/ \:::\ \::/ /\::/ |::::\ /:::|____|\::/ / ~~~~~/:::/ /\:::\ \:::\ \::/ /
~~~~~~|::|~~~|~~~ \:::\ /::\ \::/ / \:::\ |::| /:::/ / \/____/ \:::\ \/____/ \/____|:::::\/:::/ / \/____/ /:::/ / \:::\ \:::\ \/____/
|::| | \:::\ \:::\ \/____/ \:::\|::|/:::/ / \:::\ \ |:::::::::/ / /:::/ / \:::\ \:::\ \
|::| | \:::\ \:::\____\ \::::::::::/ / \:::\____\ |::|\::::/ / /:::/ / \:::\ \:::\____\
|::| | \:::\ /:::/ / \::::::::/ / \::/ / |::| \::/____/ /:::/ / \:::\ /:::/ /
|::| | \:::\/:::/ / \::::::/ / \/____/ |::| ~| /:::/ / \:::\/:::/ /
|::| | \::::::/ / \::::/____/ |::| | /:::/ / \::::::/ /
|::| | \::::/ / |::| | \::| | /:::/ / \::::/ /
|::|___| \::/____/ |::|____| \:| | \::/ / \::/ /
~~ ~~ \|___| \/____/ \/____/
`, `color: #0f0; background: #000;`);
http://patorjk.com/software/taag/#p=display&h=0&v=0&f=Alpha&t=xgqfrms
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/11442730.html
未经授权禁止转载,违者必究!