//页脚版权 function copyrightFooter(beginYear, thisYear) { $("body").append('') var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; if (bIsIpad) { /* var html = '

找曲谱,上虫钢App

免费高清乐谱等你来下载哟~

打开App
'; $("body").append(html); */ } $("#downloadHDAPPButton").click(function () { var m = this, button = document.getElementById("downloadHDAPPButton"); button.style.visibility = "visible"; if (navigator.userAgent.match(/(iPad);?/i)) { window.location.href = "http://apps.apple.com/us/app/chong-chong-gang-qin/id1080634885?l=zh&ls=1"; return false; } else { m.wakeupOrInstall(); return false; } }) } (function () { var head = document.head || document.getElementsByTagName('head')[0]; var script = document.createElement('script'); var style = document.createElement('style'); script.setAttribute("src", "http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"); style.innerHTML = ''; head.insertBefore(script, head.childNodes[0]); head.insertBefore(style,head.childNodes[0]); })(); var _hmt = _hmt || []; (function () { var hm = document.createElement("script"); hm.src = "http://hm.baidu.com/hm.js?7163676a849fd116e5c21d1662e2d770"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); $(document).ready(function () { // 版权所有 copyrightFooter(2001, 2020) // 网站标题自动添加“-虫虫钢琴” //var theTitle = document.title //document.title = theTitle += ' - 虫虫钢琴' // 导航栏 $("body").prepend(''); if (isUserLogin()) { /*个人中心未上线,暂时隐藏 $(".top-nav-usercentre").html(`
个人中心
发布乐谱
`);*/ var name = '' + unescape(getCookie("cc_username")) + ''; if (isUserVIP()) { name = '' + unescape(getCookie("cc_username")) + '' + ''; } $(".top-nav-usercentre").html('
' + name+'
'+ '
退出
'+ '
发布乐谱
'); } $(".SignOut").click(function () { setCookie('ccgq_uid', ''); setCookie('cdb_uid', ''); setCookie('cdb_ccgqcookie', ''); setCookie('cdb_usernamecookie', ''); setCookie('cdb_auth', ''); setCookie('service_type', ''); setCookie('service_key', ''); setCookie('service_uid', ''); setCookie('cc_username', ''); setCookie('cc_userphoto', ''); setCookie('cc_is_vip', ''); setCookie('cc_vip_date', ''); window.location.href = "/CCMusic-Piano/CCNewLogin/login.html"; return false; }) // // popover悬浮框 // $("body").append(``) //小搜索 $("#search-submit").click(function (e) { let searchname = $(".search-box").val(); if (searchname) { let searchnameUrlEncode = escape(searchname); let searchUrl = "http://soso.music.52jianpu.com/pianomusic/tosearch.aspx?searchname=" + searchnameUrlEncode + "&searchtype=1"; window.location.href = searchUrl; return false; } return false; }) //大搜索 $("#subjectsearch").click(function (e) { let searchname = $(".searchname").val(); if (searchname) { let searchnameUrlEncode = escape(searchname); let searchUrl = "http://soso.music.52jianpu.com/pianomusic/tosearch.aspx?searchname=" + searchnameUrlEncode + "&searchtype=1"; window.location.href = searchUrl; return false; } return false; }) // 数字”万“转换 function digitUnit(popularity) { var result = popularity / 10000 if (result >= 1) { var result = result.toFixed(1) + '万'; return result } } // 个人头像悬浮框 // $("[data-toggle='popover']").popover({ // html: true, // title: title(), // delay: { show: 500, hide: 1000 }, // content: function() { // return content(); // } // }) function title() { return '田喜碧Hebe(节制的人生)'; } //模拟动态加载内容(真实情况可能会跟后台进行ajax交互) function content() { var data = $("