开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
master
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
项目仓库所选许可证以仓库主分支所使用许可证为准
master
分支 (1)
master
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
master
JavaScript
/
Module
/
contro.js
JavaScript
/
Module
/
contro.js
contro.js 9.90 KB
一键复制 编辑 原始数据 按行查看 历史
刘海明 提交于 2014年12月01日 12:22 +08:00 . 新建项目
/**
* Created by Administrator on 14-9-23.
*/
var meta = {}, content = document.getElementsByTagName('meta');
for(var i=0;i<content.length;i++){
if(content[i].getAttribute('name') == 'logout')
meta.logout = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'Authcode')
meta.Authcode = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'verifyImg')
meta.verifyImg = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'upload')
meta.upload = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'gid')
meta.gid = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'pid')
meta.pid = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'DiscuzUrl')
meta.DiscuzUrl = content[i].getAttribute('content');
if(content[i].getAttribute('name') == 'inputhash')
meta.inputhash = content[i].getAttribute('content');
if(content[i].getAttribute('name') == '__hash__')
meta.token = content[i].getAttribute('content');
}
(function ($) {
$.extend($.fn, {
dataload:function(param){
$('[data-sea]', $(this)).each(function(index, dom){
var module = $(dom).data('sea'),
options = {title: ($(dom).attr('title'))?$(dom).attr('title'):$(dom).text()},
conf = $(dom).data('config'),
option = $(dom).data('option');
if($(dom).attr('href') || $(dom).data('target')) options.target = ($(dom).data('target'))?$(dom).data('target'):$(dom).attr('href');
if(typeof param == 'object') $.extend(options, param);
if(typeof param == 'object') $.extend(options, param);
try{
$.extend(options, eval('({'+$(dom).data('option')+'})'));
}catch(error){
try{
$.extend(options, eval('('+$(dom).data('option')+')'));
}catch(error){}
}
$.extend(options, (conf)?eval(conf):(typeof option == 'object')?option:{});
console.log(module);
$(dom).seaModule(module, options);
});
},
run: function(config, option, func){
var async = new Array(),
loading = function (){
if(typeof config.before == 'function') config.before();
if(typeof func == 'function') func(config);
if(typeof config.after == 'function') config.after();
};
$.extend(config, option);
if(config.easing && $.inArray(config.easing, ["linear", "swing"]) == -1) async.push('easing');
if(config.css) async.push(config.css);
if(async.length>0){
require.async(async, function(){
loading();
});
}else{
loading();
}
},
method: function(){
var module = (typeof arguments[0] == 'string')?arguments[0]:'alert',
option = (typeof arguments[1] == 'object')?arguments[1]:{};
$.extend($, {seaFunction: eval('$.'+module)});
$.seaFunction(option);
},
mathRand: function(){
var Num="";
for(var i=0;i<6;i++){
Num+=Math.floor(Math.random()*10);
}
return Num;
},
coffee: function(obj){
for(var eName in obj)
for(var selector in obj[eName])
$(this).on(eName, selector, obj[eName][selector]);
},
VerifyImg: function(){
$(this).css('cursor', 'pointer');
$(this).on('click', function(){
var src = $(this).attr('src');
$(this).attr('src', src+'?'+Math.random());
});
},
seaModule: function(){
var module = (typeof arguments[0] == 'string')?arguments[0]:'alert',
option = (typeof arguments[1] == 'object')?arguments[1]:{};
$.fn.seaFunction = eval('$.fn.'+module);
$(this).seaFunction(option);
}
});
$.extend($, {
seaBase: {
getMoment: function(getDate){
var d = new Date(getDate);
var x = (1901 - d.getFullYear()) % 12;
var sign = {
year: d.getFullYear(),
month: d.getMonth() + 1,
day: d.getDate()
};
with (sign){
sign.constellation = function(){
if (month == 1 && day >=20 || month == 2 && day <=18) {return "水瓶座";}
if (month == 1 && day > 31) {return "Huh?";}
if (month == 2 && day >=19 || month == 3 && day <=20) {return "双鱼座";}
if (month == 2 && day > 29) {return "Say what?";}
if (month == 3 && day >=21 || month == 4 && day <=19) {return "白羊座";}
if (month == 3 && day > 31) {return "OK. Whatever.";}
if (month == 4 && day >=20 || month == 5 && day <=20) {return "金牛座";}
if (month == 4 && day > 30) {return "I'm soooo sorry!";}
if (month == 5 && day >=21 || month == 6 && day <=21) {return "双子座";}
if (month == 5 && day > 31) {return "Umm ... no.";}
if (month == 6 && day >=22 || month == 7 && day <=22) {return "巨蟹座";}
if (month == 6 && day > 30) {return "Sorry.";}
if (month == 7 && day >=23 || month == 8 && day <=22) {return "狮子座";}
if (month == 7 && day > 31) {return "Excuse me?";}
if (month == 8 && day >=23 || month == 9 && day <=22) {return "处女座";}
if (month == 8 && day > 31) {return "Yeah. Right.";}
if (month == 9 && day >=23 || month == 10 && day <=22) {return "天秤座";}
if (month == 9 && day > 30) {return "Try Again.";}
if (month == 10 && day >=23 || month == 11 && day <=21) {return "天蝎座";}
if (month == 10 && day > 31) {return "Forget it!";}
if (month == 11 && day >=22 || month == 12 && day <=21) {return "人马座";}
if (month == 11 && day > 30) {return "Invalid day";}
if (month == 12 && day >=22 || month == 1 && day <=19) {return "摩羯座";}
if (month == 12 && day > 31) {return "No way!";}
}
sign.zodiac = function(){
if (x == 1 || x == -11) {return "";}
if (x == 0) {return "";}
if (x == 11 || x == -1) {return "";}
if (x == 10 || x == -2) {return "";}
if (x == 9 || x == -3) {return "";}
if (x == 8 || x == -4) {return "";}
if (x == 7 || x == -5) {return "";}
if (x == 6 || x == -6) {return "";}
if (x == 5 || x == -7) {return "";}
if (x == 4 || x == -8) {return "";}
if (x == 3 || x == -9) {return "";}
if (x == 2 || x == -10) {return "";}
}
}
return sign;
},
poshytipClass: function(param){
switch (param){
case 'darkgray':
return 'tip-darkgray';
case 'yellow':
return 'tip-yellow';
case 'violet':
return 'tip-violet';
case 'twitter':
return 'tip-twitter';
case 'skyblue':
return 'tip-skyblue';
default:
return 'tip-yellowsimple';
}
},
run: function(config, option, func){
var async = new Array(),
loading = function (){
if(typeof config.before == 'function') config.before();
if(typeof func == 'function') func(config);
if(typeof config.after == 'function') config.after();
};
$.extend(config, option);
if(config.easing && $.inArray(config.easing, ["linear", "swing"]) == -1) async.push('easing');
if(config.css) async.push(config.css);
if(async.length>0){
require.async(async, function(){
loading();
});
}else{
loading();
}
},
mathRand: function(){
var Num="";
for(var i=0;i<6;i++){
Num+=Math.floor(Math.random()*10);
}
return Num;
}
},
seaMethod: function(){
var module = (typeof arguments[0] == 'string')?arguments[0]:'alert',
option = (typeof arguments[1] == 'object')?arguments[1]:{};
require.async(module, function(){
$.extend($, {seaFunction: eval('$.'+module)});
$.seaFunction(option);
});
},
seaPoshytip: function(param){
var poshytip = {
className: 'tip-yellowsimple',
showOn: 'focus',
alignTo: 'target',
alignX: 'right',
alignY: 'center',
offsetX: 5,
showTimeout: 100
};
$('input, select, textarea', param).each(function(index, dom){
if($(dom).attr('placeholder')) poshytip.content = $(dom).attr('placeholder');
else poshytip.content = undefined;
if(typeof poshytip.content != undefined){
if($(dom).is('select')){
poshytip.showOn = 'hover';
}
require.async('poshytip', function(){
$(dom).poshytip(poshytip);
});
}
});
}
});
}(jQuery));
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/gadflybsd/JavaScript.git
git@gitee.com:gadflybsd/JavaScript.git
gadflybsd
JavaScript
JavaScript
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /