wordpress修改鼠标右键

浩宇 帝一

发表文章数:95

建美化代码

wordpress修改鼠标右键

  1. <!---修改鼠标右键
  2. <style type="text/css">
  3. a {text-decoration: none;}
  4. div.usercm{background-repeat:no-repeat;background-position:center center;background-size:cover;background-color:#fff;font-size:13px!important;width:130px;-moz-box-
  5. shadow:1px 1px 3px rgba
  6. (0,0,0,.3);box-shadow:1px 1px 3px rgba(0,0,0,.3);position:absolute;display:none;z-index:10000;opacity:0.9;}
  7. div.usercm ul{list-style-type:none;list-style-position:outside;margin:0px;padding:0px;display:block}
  8. div.usercm ul li{margin:0px;padding:0px;line-height:35px;border-bottom:1px solid #ccc;}
  9. div.usercm ul li a{color:#666;padding:0 15px;display:block}
  10. div.usercm ul li a:hover{color:#fff;background:rgba(170,222,18,0.88)}
  11. div.usercm ul li a i{margin-right:10px}
  12. a.disabled{color:#c8c8c8!important;cursor:not-allowed}
  13. a.disabled:hover{background-color:rgba(255,11,11,0)!important}
  14. div.usercm{background:#fff !important;}
  15. </style>
  16. <div class="usercm"> <ul>
  17. <li><a href="javascript:void(0);" onclick="getSelect();">
  18. <i class="fa fa-clipboard fa-fw"></i><span>复制文字</span></a></li>
  19. <li><a href="javascript:window.location.reload();"><i class="fa fa-refresh fa-fw"></i><span>刷新页面</span></a></li>
  20. <li><a href="javascript:history.go(1);"><i class="fa fa-arrow-right fa-fw"></i><span>前进一页</span></a></li>
  21. <li><a href="javascript:history.go(-1);"><i class="fa fa-arrow-left fa-fw"></i><span>后退一页</span></a></li>
  22. <li><a href="javascript:void(0);" onclick="baiduSearch();"><i class="fa fa-paw fa-fw"></i><span>百度搜索</span></a></li>
  23. <li><a href="https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&tn=02049043_27_pg&wd=帝一天博
  24. &oq=WordPress%25E4%25BF%25AE%25E6%2594%25B9%25E9%25BC%25A0%25E6%25A0%2587%25E5%258F%25B3%25E9%2594%25AE&rsv_pq=dfaea250000614dc&rsv_t
  25. =5d44dyfhVSLTJk6vfL%2FyKkkxz%2BAUj%2F2vEqbFse3H%2FWMdyfvxcfQMbaMM8XHcN24FQA5CvCw&rqlang=cn&rsv_enter=0&inputT=6198&rsv_sug3=17&rsv_sug1=15&
  26. rsv_sug7=100&rsv_sug2=0&rsv_sug4=6199" rel="nofollow" target="_blank" ><i class="fa fa-search"></i><span>百度帝一天博</span></a></li>
  27. </ul>
  28. </div>
  29. <script type="text/javascript">
  30. (function(a) {
  31. a.extend({
  32. mouseMoveShow: function(b) {
  33. var d = 0,
  34. c = 0,
  35. h = 0,
  36. k = 0,
  37. e = 0,
  38. f = 0;
  39. a(window).mousemove(function(g) {
  40. d = a(window).width();
  41. c = a(window).height();
  42. h = g.clientX;
  43. k = g.clientY;
  44. e = g.pageX;
  45. f = g.pageY;
  46. h + a(b).width() >= d && (e = e - a(b).width() - 5);
  47. k + a(b).height() >= c && (f = f - a(b).height() - 5);
  48. a("html").on({
  49. contextmenu: function(c) {
  50. 3 == c.which && a(b).css({
  51. left: e,
  52. top: f
  53. }).show()
  54. },
  55. click: function() {
  56. a(b).hide()
  57. }
  58. })
  59. })
  60. },
  61. disabledContextMenu: function() {
  62. window.oncontextmenu = function() {
  63. return !1
  64. }
  65. }
  66. }) })(jQuery);
  67. function getSelect() {
  68. "" == (window.getSelection ? window.getSelection() : document.selection.createRange().text) ?layer.msg('啊噢...你没还没选择文字呢!', function(){}) :
  69. document.execCommand("Copy")
  70. }
  71. function baiduSearch() {
  72. var a = window.getSelection ? window.getSelection() : document.selection.createRange().text;
  73. "" == a ? layer.msg('啊噢...你没还没选择文字呢!', function(){}): window.open("https://www.baidu.com/s?wd=" + a)
  74. }
  75. function googleSearch() {
  76. var a = window.getSelection ? window.getSelection() : document.selection.createRange().text;
  77. "" == a ? layer.msg('啊噢...你没还没选择文字呢!', function(){}): window.open("https://www.google.com/search?q=" + a)
  78. }
  79. function localSearch() {
  80. var a = window.getSelection ? window.getSelection() : document.selection.createRange().text;
  81. "" == a ? layer.msg('啊噢...你没还没选择文字呢!', function(){}): window.open("search.php?q=" + a)
  82. }
  83. $(function() {
  84. for (var a = navigator.userAgent, b = "Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"), d = !0, c = 0; c < b.length; c++) if (0 < a.indexOf(b[c])) {
  85. d = !1;
  86. break
  87. }
  88. d && ($.mouseMoveShow(".usercm"), $.disabledContextMenu())
  89. });
  90. </script>
  91. 结束修改鼠标右键 -->

未经允许不得转载:作者:帝一, 转载或复制请以 超链接形式 并注明出处 帝一天博
原文地址:《wordpress修改鼠标右键》 发布于2020-02-23, 本文最后更新于2020年2月23日,已超过138天没有更新,如果文章内容失效,请反馈给我们,谢谢!

分享到:
赞(0) 打赏 生成海报

评论 抢沙发

评论前必须登录!

  注册



长按图片转发给朋友

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

帝一天博
在此声明如有侵权,违规等请发我邮箱(admin@diyigzs.com)告知。本人会看到立即删除!! 温馨提示:最近少出门小心传染谢谢大家配合
隐藏
变装
切换注册

登录

忘记密码 ?

您也可以使用第三方帐号快捷登录

Q Q 登 录
微 博 登 录
切换登录

注册