123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- $(document).ready(function () {
- //禁用文本复制
- document.onselectstart = function () {
- return false;
- }
- //禁用鼠标右箭
- document.oncontextmenu = function () {
- return false;
- }
-
-
- POST = function(name = '地址',json = '数据',result = '回调') {
- $.post('http://panhua.nat100.top/'+name,json,function(data){
- result(data);
- })
- }
- 滑动显示 = function (table1 = '标签一',time = '时间') {
- $(table1).css({
- overflow:'hidden',
- cursor:'pointer',
- }).find('div').css({
- width:$(table1).width(),
- height:$(table1).height(),
- background:'rgba(44,62,80,.4)',
- marginTop:$(table1).height()-$(table1).find('span').height(),
- cursor:'pointer',
- }).find('*').css({
- width:$(table1).width(),
- color:'#FFF',
- margin:'5px',
- textAlign:'left',
- });
- $(table1).hover(function(){
- $(this).find('div').animate({
- marginTop:'0px',
- },time)
- },function(){
- $(this).find('div').animate({
- marginTop:$(this).height()-$(this).find('span').height(),
- },time);
- });
- }
- alert_s = function(value = '类容'){
- $('body').append(`
- <div id="alert" style="background:transparent;
- left:0px;
- right:0px;
- top:0px;
- bottom:0px;
- margin:auto;
- text-align: center;
- position:fixed;
- z-index:999999;">
- <div style="text-align: center;position:absolute;
- left:0px;right:0px;top:0px;bottom:0px;margin:auto;
- width:150px;height:35px;border-radius:5px;background: rgba(0,0,0,0.3)">
- <span style="height:35px;line-height:35px;color: #ffffff;font-size: 13px">${value}</span>
- </div>
- </div>`);
- setTimeout(function () {
- $('#alert').remove();
- },500)
- }
- //-----------------------------------------------------------------------------------------
- $('#ifame').css({
- backgroundImage:'url(https://www.gitinn.com/pan-chinese/_blogs/raw/master/img/'+parseInt(Math.random()*11+1)+'.png)',
- })
-
-
-
- $('input[placeholder="请输入内容"]').attr('id','search').attr('autocomplete','off');
- setTimeout(function () {
- $('#search').focus(function(){
- $(this).attr('placeholder','')
- }).blur(function () {
- $(this).attr('placeholder','请输入内容')
- });
- },300)
-
- $('.Body_val>h1').text('').text('欢迎来到Hopeの我的blog');
-
- $('head').after(`
- <style>
- body{
- overflow: hidden;
- }
- #search::-webkit-input-placeholder{
- color: #999;
- }
- #ifame{
- position: absolute;
- min-width: 1200px;
- width: 100%;
- height: 100%;
- background-color: transparent;
- background-size: cover;
- background-position: center center;
- background-repeat: no-repeat;
- overflow-y:scroll;
- overflow-x:hidden;
- }
- #ifame::-webkit-scrollbar{
- width: 5px;
- height: 8px;
- }
- #ifame::-webkit-scrollbar-button{
- width: 0px;
- height: 0px;
- }
- #ifame::-webkit-scrollbar-thumb{
- width: 5px;
- height: 8px;
- background-color: rgb(53, 185, 149);
- }
- </style>
- `)
-
- //----------------------------------------------------------------------------------------------
- })
|