shell bypass 403
toastr.options.positionClass = 'toast-center-center';
//删除搜索记录
$("#spanDelete").click(function () {
localStorage.removeItem("lasttool");
$(".history_search").html("");
});
function showlasttoolc() {
var items = getlasttoolc();
items = items.slice(1,11);
var temp = [];
for (var i = 0; i < items.length; i++) {
var item = "<li><a href=\""+items[i][1]+"\">" + items[i][0] + "</a></li>";
temp.push(item);
}
$(".lasttool").html(temp.join(""));
}
function lasttoolc(tooltitle,toolturl) {
var items = getlasttoolc();
var item = [tooltitle,toolturl]
for (var i = 0; i < items.length; i++) {
if (items[i][0] === tooltitle) {
items.splice(i, 1)
}
}
items.unshift(item);
items = items.slice(0,11);
var strItems = JSON.stringify(items);
var options=new Array();
options['expires']=365;
options['domain']='.'+ siteyuming +'';
cookiefun("lasttool", strItems,options);
}
function getlasttoolc() {
var strItems = cookiefun("lasttool");
var items = JSON.parse(strItems);
if (items === null) {
items = [];
}
return items;
}
function cookiefun(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
var path = options.path ? '; path=' + options.path : '';
var domain = options.domain ? '; domain=' + options.domain : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
//保存浏览记录工具
lasttoolc(tooltitle, toolturl);
// lasttool(tooltitle, toolturl);
//显示浏览记录
showlasttoolc();
// 将Object的属性值输出成Array
function objOfValueToArr(object) {
var arr = [];
for (var item in object) {
arr[item] = object[item];
}
return arr;
}
function pushlink(){
//链接库操作
var urlku;
var titleku;
urlku = window.location.href; /* 获取完整URL */
$.ajax({
url: yuming+'/ajax/index/pushlink',
type: "get",
dataType: 'jsonp',
jsonpCallback: "handleCallback",
data: {
"urlku": urlku,
"titleku": urltitle,
}
});
}
$(function () {
//格式化数字
var number_format = function (text) {
return text.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
};
//动画数字
$('.number-count').each(function () {
var $this = $(this);
$({from: 0, to: $this.data("to"), elem: $this}).animate({from: $this.data("to")}, {
duration: 1000,
easing: 'swing',
step: function () {
$this.text(number_format(Math.ceil(this.from)));
},
complete: function () {
if (number_format(this.to) != this.elem.text()) {
this.elem.text(number_format(this.to));
}
}
});
});
//链接库操作
pushlink();
var animate = new Animate({
target: '[data-animate]',
animatedClass: 'visible',
offset: [1],
delay: 0,
remove: true,
reverse: false,
scrolled: false,
debug: true,
onLoad: true,
onScroll: true,
onResize: false,
callbackOnInit: function () {
console.log('Initialised');
},
callbackOnInView: function (element) {
var animationType = element.getAttribute('data-animation-classes').replace('animated', '')
.trim();
console.log(animationType + ' in view.');
},
callbackOnAnimate: function (element) {
console.log(element)
}
});
animate.init();
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?ed68fff3fc2a014b3812eec2c2d1711c";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
});