Browse Source

代码优化

懒得勤快 5 years ago
parent
commit
3ce373a61e
41 changed files with 275 additions and 324 deletions
  1. 4 4
      src/Masuit.MyBlogs.Core/Controllers/SubscribeController.cs
  2. 1 1
      src/Masuit.MyBlogs.Core/Views/Home/Author.cshtml
  3. 1 1
      src/Masuit.MyBlogs.Core/Views/Home/Category.cshtml
  4. 1 1
      src/Masuit.MyBlogs.Core/Views/Home/Post.cshtml
  5. 1 1
      src/Masuit.MyBlogs.Core/Views/Home/Tag.cshtml
  6. 2 2
      src/Masuit.MyBlogs.Core/Views/Links/Index.cshtml
  7. 2 2
      src/Masuit.MyBlogs.Core/Views/Links/Index_Admin.cshtml
  8. 1 1
      src/Masuit.MyBlogs.Core/Views/Misc/About.cshtml
  9. 1 1
      src/Masuit.MyBlogs.Core/Views/Misc/Agreement.cshtml
  10. 1 1
      src/Masuit.MyBlogs.Core/Views/Misc/Disclaimer.cshtml
  11. 1 1
      src/Masuit.MyBlogs.Core/Views/Misc/Donate.cshtml
  12. 1 1
      src/Masuit.MyBlogs.Core/Views/Misc/Donate_Admin.cshtml
  13. 1 1
      src/Masuit.MyBlogs.Core/Views/Misc/Index.cshtml
  14. 1 1
      src/Masuit.MyBlogs.Core/Views/Msg/Index.cshtml
  15. 1 1
      src/Masuit.MyBlogs.Core/Views/Msg/Index_Admin.cshtml
  16. 3 3
      src/Masuit.MyBlogs.Core/Views/Notice/Details.cshtml
  17. 1 1
      src/Masuit.MyBlogs.Core/Views/Notice/Index.cshtml
  18. 1 1
      src/Masuit.MyBlogs.Core/Views/Notice/Index_Admin.cshtml
  19. 1 1
      src/Masuit.MyBlogs.Core/Views/Post/All.cshtml
  20. 8 8
      src/Masuit.MyBlogs.Core/Views/Post/CompareVersion.cshtml
  21. 21 20
      src/Masuit.MyBlogs.Core/Views/Post/Details.cshtml
  22. 10 10
      src/Masuit.MyBlogs.Core/Views/Post/Details_Admin.cshtml
  23. 6 6
      src/Masuit.MyBlogs.Core/Views/Post/History.cshtml
  24. 14 13
      src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion.cshtml
  25. 16 16
      src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion_Admin.cshtml
  26. 1 1
      src/Masuit.MyBlogs.Core/Views/Post/Publish.cshtml
  27. 9 10
      src/Masuit.MyBlogs.Core/Views/Post/PushMerge.cshtml
  28. 9 9
      src/Masuit.MyBlogs.Core/Views/Post/RepushMerge.cshtml
  29. 2 2
      src/Masuit.MyBlogs.Core/Views/Search/Search.cshtml
  30. 3 3
      src/Masuit.MyBlogs.Core/Views/Seminar/Index.cshtml
  31. 1 1
      src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListItem.cshtml
  32. 1 1
      src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListItem_Admin.cshtml
  33. 1 1
      src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListPartial.cshtml
  34. 3 3
      src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListPartial_Admin.cshtml
  35. 4 4
      src/Masuit.MyBlogs.Core/Views/Shared/_Aside.cshtml
  36. 8 8
      src/Masuit.MyBlogs.Core/Views/Tools/Address.cshtml
  37. 17 13
      src/Masuit.MyBlogs.Core/Views/Tools/GetIPInfo.cshtml
  38. 8 8
      src/Masuit.MyBlogs.Core/Views/Tools/Position.cshtml
  39. 15 15
      src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.js
  40. 0 0
      src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.min.js
  41. 92 146
      src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/scripts.js

+ 4 - 4
src/Masuit.MyBlogs.Core/Controllers/SubscribeController.cs

@@ -113,7 +113,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// RSS分类订阅
         /// </summary>
         /// <returns></returns>
-        [Route("/rss/cat/{id}"), ResponseCache(Duration = 600)]
+        [Route("/cat/{id}/rss"), ResponseCache(Duration = 600)]
         public IActionResult CategoryRss(int id)
         {
             var time = DateTime.Today.AddDays(-1);
@@ -159,8 +159,8 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// RSS文章订阅
         /// </summary>
         /// <returns></returns>
-        [Route("/rss/{id}"), ResponseCache(Duration = 600)]
-        public IActionResult Rss(int id)
+        [Route("/{id}/rss"), ResponseCache(Duration = 600)]
+        public IActionResult PostRss(int id)
         {
             string scheme = Request.Scheme;
             var host = Request.Host;
@@ -205,7 +205,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// RSS文章评论订阅
         /// </summary>
         /// <returns></returns>
-        [Route("/rss/{id}/comments"), ResponseCache(Duration = 600)]
+        [Route("/{id}/comments/rss"), ResponseCache(Duration = 600)]
         public IActionResult CommentsRss(int id)
         {
             string scheme = Request.Scheme;

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Home/Author.cshtml

@@ -32,7 +32,7 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Home/Category.cshtml

@@ -34,7 +34,7 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Home/Post.cshtml

@@ -9,7 +9,7 @@
 @model HomePageViewModel
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Home/Tag.cshtml

@@ -8,7 +8,7 @@
 }
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 2 - 2
src/Masuit.MyBlogs.Core/Views/Links/Index.cshtml

@@ -8,7 +8,7 @@
 <link href="~/Content/common/btnstyle.css" rel="stylesheet" />
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <header class="page-header text-center">
@@ -37,7 +37,7 @@
             本站描述:本站是一个集精品软件、资源共享、前端技术和后端开发等互联网技术分享的博客,专注于软件绿化、系统封装、前端开发和后端技术。热衷于互联网行业,喜欢各种折腾。
         </p>
         <p>
-            PS:链接由于无法访问或您的博客没有发现本站链接等其他原因,将会暂时撤销超链接,恢复请到 @Html.ActionLink("留言板", "Index", "Msg", null, new { @class = "btn btn-info" }) 通知我,望请谅解,谢谢!
+            PS:链接由于无法访问或您的博客没有发现本站链接等其他原因,将会暂时撤销超链接,恢复请到 <a asp-controller="Msg" asp-action="Index" class="btn btn-info">留言板</a> 通知我,望请谅解,谢谢!
         </p>
         <p>或者,您也可以尝试<button type="button" class="btn btn-info" onclick="add()">自助通道</button>进行添加友情链接</p>
     </article>

+ 2 - 2
src/Masuit.MyBlogs.Core/Views/Links/Index_Admin.cshtml

@@ -8,7 +8,7 @@
 <link href="~/Content/common/btnstyle.css" rel="stylesheet" />
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <header class="page-header text-center">
@@ -37,7 +37,7 @@
             本站描述:本站是一个集精品软件、资源共享、前端技术和后端开发等互联网技术分享的博客,专注于软件绿化、系统封装、前端开发和后端技术。热衷于互联网行业,喜欢各种折腾。
         </p>
         <p>
-            PS:链接由于无法访问或您的博客没有发现本站链接等其他原因,将会暂时撤销超链接,恢复请到 @Html.ActionLink("留言板", "Index", "Msg", null, new { @class = "btn btn-info" }) 通知我,望请谅解,谢谢!
+            PS:链接由于无法访问或您的博客没有发现本站链接等其他原因,将会暂时撤销超链接,恢复请到 <a asp-controller="Msg" asp-action="Index" class="btn btn-info">留言板</a> 通知我,望请谅解,谢谢!
         </p>
     </article>
     <section>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Misc/About.cshtml

@@ -31,7 +31,7 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Misc/Agreement.cshtml

@@ -5,7 +5,7 @@
 
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Misc/Disclaimer.cshtml

@@ -37,7 +37,7 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
 </div>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Misc/Donate.cshtml

@@ -36,7 +36,7 @@
 <script src="~/Scripts/tm.pagination.js"></script>
 <script src="~/Scripts/ng-table.min.js"></script>
 <ol class="cd-breadcrumb triangle">
-    <li>@Html.ActionLink("首页", "Index", "Home")</li>
+    <li><a asp-controller="Home" asp-action="Index">首页</a></li>
     <li class="current"><em>@ViewBag.Title</em></li>
 </ol>
 <div class="bg-title">

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Misc/Donate_Admin.cshtml

@@ -39,7 +39,7 @@
 <script src="~/Scripts/ng-table.min.js"></script>
 <script src="~/Assets/jedate/jquery.jedate.min.js"></script>
 <ol class="cd-breadcrumb triangle">
-    <li>@Html.ActionLink("首页", "Index", "Home")</li>
+    <li><a asp-controller="Home" asp-action="Index">首页</a></li>
     <li class="current">
         <em>@ViewBag.Title</em>
     </li>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Misc/Index.cshtml

@@ -38,7 +38,7 @@
     }
 </style>
 <ol class="cd-breadcrumb triangle">
-    <li>@Html.ActionLink("首页", "Index", "Home")</li>
+    <li><a asp-controller="Home" asp-action="Index">首页</a></li>
     <li class="current">
         <em>@ViewBag.Title</em>
     </li>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Msg/Index.cshtml

@@ -7,7 +7,7 @@
 <script src="~/Assets/layui/layui.all.js"></script>
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current">
             <em>@ViewBag.Title</em>
         </li>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Msg/Index_Admin.cshtml

@@ -11,7 +11,7 @@
 <script src="~/Assets/layui/layui.all.js"></script>
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <form class="form-horizontal animated pulse" id="msg-form" method="post">

+ 3 - 3
src/Masuit.MyBlogs.Core/Views/Notice/Details.cshtml

@@ -30,8 +30,8 @@
     }
 </style>
 <ol class="cd-breadcrumb triangle">
-    <li>@Html.ActionLink("首页", "Index", "Home")</li>
-    <li>@Html.ActionLink("公告列表", "Index", "Notice")</li>
+    <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+    <li><a asp-controller="Notice" asp-action="Index">公告列表</a></li>
     <li class="current"><em>@ViewBag.Title</em></li>
 </ol>
 <div class="bg-title">
@@ -51,7 +51,7 @@
             <div class="ibox-content">
                 <section class="wow fadeInUp">
                     <div class="btn-group">
-                        @Html.ActionLink("<<返回公告列表页", "Index", "Notice", null, new { @class = "btn btn-info" })
+                        <a asp-controller="Notice" asp-action="Index">&lt;&lt;返回公告列表页</a>
                         @{
                             var user = Context.Session.Get<UserInfoDto>(SessionKey.UserInfo) ?? new UserInfoDto();
                             if (user.IsAdmin)

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Notice/Index.cshtml

@@ -5,7 +5,7 @@
 }
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Notice/Index_Admin.cshtml

@@ -5,7 +5,7 @@
 }
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <a asp-controller="Dashboard" asp-action="Index" asp-fragment="/notice/index" class="btn btn-info">发布新公告</a>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Post/All.cshtml

@@ -13,7 +13,7 @@
 <link href="~/Content/common/post-all.min.css" rel="stylesheet" />
 <div class="container-fluid">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <svg id="svg-source" height="0" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position: absolute">

+ 8 - 8
src/Masuit.MyBlogs.Core/Views/Post/CompareVersion.cshtml

@@ -21,10 +21,10 @@
 <link href="~/Assets/UEditor/third-party/SyntaxHighlighter/styles/shCore.min.css" rel="stylesheet" />
 <div class="container-fluid">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
-        <li>@Html.ActionLink(Model[0].Title, "Details", "Post", new { id = Model[0].Id }, null)</li>
-        <li>@Html.ActionLink("历史版本", "History", "Post", new { id = Model[0].Id }, null)</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
+        <li><a asp-controller="Post" asp-action="Details" asp-route-id="@Model[0].Id">@Model[0].Title</a></li>
+        <li><a asp-controller="Post" asp-action="History" asp-route-id="@Model[0].Id">历史版本</a></li>
         <li class="current">
             <em>版本对比</em>
         </li>
@@ -47,14 +47,14 @@
                                     <div class="row">
                                         <div class="col-sm-7">
                                             <div class="padding-bot10">
-                                                <span class="label label-@colors[new Random().Next() % colors.Length]">@Model[1].Modifier</span>修改于<span class="text-success">@Model[1].ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</span> | 原分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model[1].Category.Name, "Category", "Home", new { id = Model[1].CategoryId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })
+                                                <span class="label label-@colors[new Random().Next() % colors.Length]">@Model[1].Modifier</span>修改于<span class="text-success">@Model[1].ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</span> | 原分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model[1].CategoryId" class="label label-@colors[new Random().Next() % colors.Length]">@Model[1].Category.Name</a>
                                                 @if (Model[1].Seminar.Any())
                                                 {
                                                     <span> | 原所属专题:</span>
                                                     var seminars = Model[1].Seminar;
                                                     foreach (var s in seminars)
                                                     {
-                                                        @Html.ActionLink(s.Seminar.Title, "Index", "Seminar", new { id = s.SeminarId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })<text> </text>
+                                                        <a asp-controller="Seminar" asp-action="Index" asp-route-id="@s.SeminarId" class="label label-@colors[new Random().Next() % colors.Length]">@s.Seminar.Title</a><text> </text>
                                                     }
                                                 }
                                             </div>
@@ -133,14 +133,14 @@
                                     <div class="row">
                                         <div class="col-sm-7">
                                             <div class="padding-bot10">
-                                                <span class="label label-@colors[new Random().Next() % colors.Length]">@Model[2].Modifier</span>修改于<span class="text-success">@Model[2].ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</span> | 原分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model[2].Category.Name, "Category", "Home", new { id = Model[2].CategoryId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })
+                                                <span class="label label-@colors[new Random().Next() % colors.Length]">@Model[2].Modifier</span>修改于<span class="text-success">@Model[2].ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</span> | 原分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model[2].CategoryId" class="label label-@colors[new Random().Next() % colors.Length]">@Model[2].Category.Name</a>
                                                 @if (Model[2].Seminar.Any())
                                                 {
                                                     <span> | 原所属专题:</span>
                                                     var seminars = Model[2].Seminar;
                                                     foreach (var s in seminars)
                                                     {
-                                                        @Html.ActionLink(s.Seminar.Title, "Index", "Seminar", new { id = s.SeminarId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })<text> </text>
+                                                        <a asp-controller="Seminar" asp-action="Index" asp-route-id="@s.SeminarId" class="label label-@colors[new Random().Next() % colors.Length]">@s.Seminar.Title</a><text> </text>
                                                     }
                                                 }
                                             </div>

+ 21 - 20
src/Masuit.MyBlogs.Core/Views/Post/Details.cshtml

@@ -25,8 +25,8 @@
 <script src="~/Assets/highlight/js/highlight.js"></script>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <div class="wrapper-content article">
@@ -74,18 +74,19 @@
                             </div>
                             <div class="row">
                                 <div class="col-md-12 line-height24">
-                                    分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model.Category.Name, "Category", "Home", new { id = Model.CategoryId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] }) | 评论总数:<span class="text-danger">@Model.Comment.Count</span>条 | 热度:<span class="text-danger">@Model.TotalViewCount</span>℃
+                                    分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model.CategoryId" class="label label-@colors[new Random().Next() % colors.Length]">@Model.Category.Name</a> | 评论总数:<span class="text-danger">@Model.Comment.Count</span>条 | 热度:<span class="text-danger">@Model.TotalViewCount</span>℃
                                     @if (Model.Seminar.Any())
                                     {
                                         <span> | 所属专题:</span>
                                         var seminars = Model.Seminar;
                                         foreach (var s in seminars)
                                         {
-                                            @Html.ActionLink(s.Seminar.Title, "Index", "Seminar", new { id = s.SeminarId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })<text> </text>
+                                            <a asp-controller="Seminar" asp-action="Index" asp-route-id="@s.SeminarId" class="label label-@colors[new Random().Next() % colors.Length]">@s.Seminar.Title</a>
+                                            <text> </text>
                                         }
                                     }
                                     <div class="pull-right margin-right20">
-                                        @Html.ActionLink("我要编辑", "PushMerge", "Post", new { id = Model.Id }, new { @class = "btn btn-danger" })
+                                        <a asp-controller="Post" asp-action="PushMerge" asp-route-id="@Model.Id" class="btn btn-danger">我要编辑</a>
                                     </div>
                                 </div>
                             </div>
@@ -176,7 +177,7 @@
                     </div>
                     <div class="col-xs-6 text-right">
                         <div class="btn-group">
-                            <a class="btn btn-danger btn-lg" asp-controller="Subscribe" asp-action="Rss" asp-route-id="@Model.Id" target="_blank">
+                            <a class="btn btn-danger btn-lg" asp-controller="Subscribe" asp-action="PostRss" asp-route-id="@Model.Id" target="_blank">
                                 <i class="icon-rss4"></i><span>订阅本文更新</span>
                             </a>
                             <button type="button" id="donate" class="btn btn-info btn-lg">
@@ -192,7 +193,7 @@
                             PostModelBase prev = ViewBag.Prev;
                             if (prev != null)
                             {
-                                @Html.ActionLink(prev.Title, "Details", "Post", new { id = prev.Id }, null)
+                                <a asp-controller="Post" asp-action="Details" asp-route-id="@prev.Id">@prev.Title</a>
                             }
                             else
                             {
@@ -206,7 +207,7 @@
                             PostModelBase next = ViewBag.Next;
                             if (next != null)
                             {
-                                @Html.ActionLink(next.Title, "Details", "Post", new { id = next.Id }, null)
+                                <a asp-controller="Post" asp-action="Details" asp-route-id="@next.Id">@next.Title</a>
                             }
                             else
                             {
@@ -221,7 +222,7 @@
                         <h3>文章历史版本:</h3>
                         <p>
                             修改次数:@Model.PostHistoryVersion.Count 次
-                            @Html.ActionLink("查看历史版本", "History", "Post", new { id = Model.Id }, null)
+                            <a asp-controller="Post" asp-action="History" asp-route-id="@Model.Id">查看历史版本</a>
                         </p>
                     </section>
                 }
@@ -243,8 +244,8 @@
                                 @for (int i = 1; i < count; i += 2)
                                 {
                                     <tr>
-                                        <td style="width: 50%">@Html.ActionLink(posts[i - 1].Title, "Details", "Post", new { id = posts[i - 1].Id }, null)</td>
-                                        <td>@Html.ActionLink(posts[i].Title, "Details", "Post", new { id = posts[i].Id }, null)</td>
+                                        <td style="width: 50%"><a asp-controller="Post" asp-action="Details" asp-route-id="@posts[i - 1].Id">@posts[i - 1].Title</a></td>
+                                        <td><a asp-controller="Post" asp-action="Details" asp-route-id="@posts[i].Id">@posts[i].Title</a></td>
                                     </tr>
                                 }
                             </table>
@@ -375,8 +376,14 @@
 <script src="~/Assets/UEditor/third-party/SyntaxHighlighter/scripts/shCore.min.js"></script>
 <script src="~/Assets/UEditor/third-party/SyntaxHighlighter/scripts/bundle.min.js"></script>
 <script src="~/Assets/jquery.tocify/jquery.tocify.js"></script>
-<script src="~/Scripts/global/article.min.js"></script>
+<script src="~/Scripts/global/article.js"></script>
 <script>
+    @if(Model.DisableCopy) {
+        <text>
+    GlobalCopyrightProtect();
+    debugger;
+        </text>
+    }
     window.onload = function() {
         var keywords = @Html.Raw(ViewData["keywords"] ?? "[]");
         for (var i = 0; i < keywords.length; i++) {
@@ -392,7 +399,7 @@
                     id: @Model.Id,
                     page: page,
                     size: size
-                }, (data) => {
+                }, function(data) {
                     data = data.Data;
                     if (data) {
                         document.querySelector(".media-list").innerHTML = loadParentComments(data);
@@ -414,7 +421,7 @@
             page: 1,
             size: 10,
             cid:@cid
-        }, (data) => {
+        }, function(data) {
             data = data.Data;
             if (data) {
                 document.querySelector(".media-list").innerHTML = loadParentComments(data);
@@ -423,10 +430,4 @@
             }
         });
     }
-    @if(Model.DisableCopy) {
-        <text>
-    debugger;
-    GlobalCopyrightProtect();
-        </text>
-    }
 </script>

+ 10 - 10
src/Masuit.MyBlogs.Core/Views/Post/Details_Admin.cshtml

@@ -25,8 +25,8 @@
 <script src="~/Assets/share/jquery.share.min.js"></script>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <div class="wrapper-content article">
@@ -74,19 +74,19 @@
                             </div>
                             <div class="row">
                                 <div class="col-md-12 line-height24">
-                                    分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model.Category.Name, "Category", "Home", new { id = Model.CategoryId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] }) | 评论总数:<span class="text-danger">@Model.Comment.Count</span>条 | 热度:<span class="text-danger">@Model.TotalViewCount</span>℃ | 状态:@Model.Status.GetDisplay()
+                                    分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model.CategoryId" class="label label-@colors[new Random().Next() % colors.Length]">@Model.Category.Name</a>  | 评论总数:<span class="text-danger">@Model.Comment.Count</span>条 | 热度:<span class="text-danger">@Model.TotalViewCount</span>℃ | 状态:@Model.Status.GetDisplay()
                                     @if (Model.Seminar.Any())
                                     {
                                         <span> | 所属专题:</span>
                                         var seminars = Model.Seminar;
                                         foreach (var s in seminars)
                                         {
-                                            @Html.ActionLink(s.Seminar.Title, "Index", "Seminar", new { id = s.SeminarId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })<text> </text>
+                                            <a asp-controller="Seminar" asp-action="Index" asp-route-id="@s.SeminarId" class="label label-@colors[new Random().Next() % colors.Length]">@s.Seminar.Title</a><text> </text>
                                         }
                                     }
                                     <div class="pull-right margin-right20">
                                         <div class="btn-group">
-                                            @Html.ActionLink("刷新", "Refresh", "Post", new { id = Model.Id }, new { @class = "btn btn-info" })
+                                            <a asp-controller="Post" asp-action="Refresh" asp-route-id="@Model.Id" class="btn btn-info">刷新</a>
                                             @if (Model.IsFixedTop)
                                             {
                                                 <button class="btn btn-success" id="pin">取消置顶</button>
@@ -174,7 +174,7 @@
                             PostModelBase prev = ViewBag.Prev;
                             if (prev != null)
                             {
-                                @Html.ActionLink(prev.Title, "Details", "Post", new { id = prev.Id }, null)
+                                <a asp-controller="Post" asp-action="Details" asp-route-id="@prev.Id">@prev.Title</a>
                             }
                             else
                             {
@@ -188,7 +188,7 @@
                             PostModelBase next = ViewBag.Next;
                             if (next != null)
                             {
-                                @Html.ActionLink(next.Title, "Details", "Post", new { id = next.Id }, null)
+                                <a asp-controller="Post" asp-action="Details" asp-route-id="@next.Id">@next.Title</a>
                             }
                             else
                             {
@@ -203,7 +203,7 @@
                         <h3>文章历史版本:</h3>
                         <p>
                             修改次数:@Model.PostHistoryVersion.Count 次
-                            @Html.ActionLink("查看历史版本", "History", "Post", new { id = Model.Id }, null)
+                            <a asp-controller="Post" asp-action="History" asp-route-id="@Model.Id">查看历史版本</a>
                         </p>
                     </section>
                 }
@@ -225,8 +225,8 @@
                                 @for (int i = 1; i < count; i += 2)
                                 {
                                     <tr>
-                                        <td>@Html.ActionLink(posts[i - 1].Title, "Details", "Post", new { id = posts[i - 1].Id }, null)</td>
-                                        <td>@Html.ActionLink(posts[i].Title, "Details", "Post", new { id = posts[i].Id }, null)</td>
+                                        <td style="width: 50%"><a asp-controller="Post" asp-action="Details" asp-route-id="@posts[i - 1].Id">@posts[i - 1].Title</a></td>
+                                        <td><a asp-controller="Post" asp-action="Details" asp-route-id="@posts[i].Id">@posts[i].Title</a></td>
                                     </tr>
                                 }
                             </table>

+ 6 - 6
src/Masuit.MyBlogs.Core/Views/Post/History.cshtml

@@ -9,8 +9,8 @@
 }
 <div class="container" style="min-height: 70vh">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li>@Html.ActionLink(post.Title.Length > 40 ? post.Title.Substring(0, 40) + "..." : post.Title, "Details", "Post", new { id = post.Id }, null)</li>
         <li class="current"><em>历史版本</em></li>
     </ol>
@@ -32,10 +32,10 @@
                     <input type="checkbox" name="vers" id="0" />
                 </td>
                 <td>
-                    @Html.ActionLink(post.Title, "Details", "Post", new { id = post.Id }, null) <span class="text-red">(最新版本)</span>
+                    <a asp-controller="Post" asp-action="Details" asp-route-id="@post.Id">@post.Title</a><span class="text-red">(最新版本)</span>
                 </td>
                 <td>
-                    @Html.ActionLink(post.Category.Name, "Category", "Home", new { id = post.CategoryId }, null)
+                    <a asp-controller="Home" asp-action="Category" asp-route-id="@post.CategoryId">@post.Category.Name</a>
                 </td>
                 <td>@post.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</td>
                 <td>@post.Modifier</td>
@@ -47,10 +47,10 @@
                         <input type="checkbox" name="vers" id="@p.Id" />
                     </td>
                     <td>
-                        @Html.ActionLink(p.Title, "HistoryVersion", "Post", new { id = p.PostId, hid = p.Id }, null)
+                        <a asp-controller="Post" asp-action="HistoryVersion" asp-route-id="@p.PostId" asp-route-hid="@p.Id">@p.Title</a>
                     </td>
                     <td>
-                        @Html.ActionLink(p.Category.Name, "Category", "Home", new { id = post.CategoryId }, null)
+                        <a asp-controller="Home" asp-action="Category" asp-route-id="@post.CategoryId">@p.Category.Name</a>
                     </td>
                     <td>@p.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</td>
                     <td>@p.Modifier</td>

+ 14 - 13
src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion.cshtml

@@ -12,10 +12,10 @@
 <link href="~/Assets/UEditor/third-party/SyntaxHighlighter/styles/shCore.min.css" rel="stylesheet" />
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li>@Html.ActionLink(Model.Post.Title.Length > 20 ? Model.Post.Title.Substring(0, 20) + "..." : Model.Post.Title, "Details", "Post", new { id = Model.PostId }, null)</li>
-        <li>@Html.ActionLink("历史版本", "History", "Post", new { id = Model.PostId }, null)</li>
+        <li><a asp-controller="Post" asp-action="History" asp-route-id="@Model.PostId">历史版本</a></li>
         <li class="current"><em>@(Model.Title.Length > 40 ? Model.Title.Substring(0, 40) + "..." : Model.Title)</em></li>
     </ol>
     <div class="wrapper-content article">
@@ -35,14 +35,14 @@
                                 <div class="col-sm-7">
                                     <div class="padding-bot10">
                                         <span class="label label-@colors[new Random().Next() % colors.Length]">@Model.Modifier</span>修改于<span class="text-success">@Model.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</span> |
-                                        原分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model.Category.Name, "Category", "Home", new { id = Model.CategoryId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })
+                                        原分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model.CategoryId" class="label label-@colors[new Random().Next() % colors.Length]">@Model.Category.Name</a>
                                         @if (Model.Seminar.Any())
                                         {
                                             <span> | 原所属专题:</span>
                                             var seminars = Model.Seminar;
                                             foreach (var s in seminars)
                                             {
-                                                @Html.ActionLink(s.Seminar.Title, "Index", "Seminar", new { id = s.SeminarId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })<text> </text>
+                                                <a asp-controller="Seminar" asp-action="Index" asp-route-id="@s.SeminarId" class="label label-@colors[new Random().Next() % colors.Length]">@s.Seminar.Title</a><text> </text>
                                             }
                                         }
                                     </div>
@@ -66,6 +66,7 @@
                                     }
                                 }
                             </div>
+                            <p class="text-focus text-center">您目前正在查看该文章的历史版本,文章的历史版本可能无法为您提供最准确及时的资讯,不具备任何参考价值,<a asp-controller="Post" asp-action="Details" asp-route-id="@Model.PostId">点击前往</a>该文章的最新版本。</p>
                         </header>
                         <article class="article" id="article">
                             @Html.Raw(Model.Content.ReplaceImgAttribute(Model.Title))
@@ -124,7 +125,7 @@
                             PostHistoryVersion prev = ViewBag.Prev;
                             if (prev != null)
                             {
-                                @Html.ActionLink(prev.Title, "HistoryVersion", "Post", new { id = prev.PostId, hid = prev.Id }, null)
+                                <a asp-controller="Post" asp-action="HistoryVersion" asp-route-id="@prev.PostId" asp-route-hid="@prev.Id">@prev.Title</a>
                             }
                             else
                             {
@@ -138,7 +139,7 @@
                             PostHistoryVersion next = ViewBag.Next;
                             if (next != null)
                             {
-                                @Html.ActionLink(next.Title, "HistoryVersion", "Post", new { id = next.PostId, hid = next.Id }, null)
+                                <a asp-controller="Post" asp-action="HistoryVersion" asp-route-id="@next.PostId" asp-route-hid="@next.Id">@next.Title</a>
                             }
                             else
                             {
@@ -187,6 +188,12 @@
 <script src="~/Assets/jquery.tocify/jquery.tocify.js"></script>
 <script>
     $(function () {
+        @if(Model.Post.DisableCopy) {
+            <text>
+        debugger;
+        GlobalCopyrightProtect();
+            </text>
+        }
         $("#toc").show();
         var toc = $("#toc").tocify({
             selectors: ".ibox-content h3,.ibox-content h4,.ibox-content h5"
@@ -226,10 +233,4 @@
             });
         });
     })
-    @if(Model.Post.DisableCopy) {
-        <text>
-    debugger;
-    GlobalCopyrightProtect();
-        </text>
-    }
 </script>

+ 16 - 16
src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion_Admin.cshtml

@@ -10,10 +10,10 @@
 <link href="~/Assets/UEditor/third-party/SyntaxHighlighter/styles/shCore.min.css" rel="stylesheet" />
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li>@Html.ActionLink(Model.Post.Title.Length > 20 ? Model.Post.Title.Substring(0, 20) + "..." : Model.Post.Title, "Details", "Post", new { id = Model.PostId }, null)</li>
-        <li>@Html.ActionLink("历史版本", "History", "Post", new { id = Model.PostId }, null)</li>
+        <li><a asp-controller="Post" asp-action="History" asp-route-id="@Model.PostId">历史版本</a></li>
         <li class="current"><em>@(Model.Title.Length > 40 ? Model.Title.Substring(0, 40) + "..." : Model.Title)</em></li>
     </ol>
     <div class="wrapper-content article">
@@ -33,14 +33,14 @@
                                 <div class="col-sm-7">
                                     <div class="padding-bot10">
                                         <span class="label label-@colors[new Random().Next() % colors.Length]">@Model.Modifier</span>修改于<span class="text-success">@Model.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")</span> |
-                                        原分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model.Category.Name, "Category", "Home", new { id = Model.CategoryId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })
+                                        原分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model.CategoryId" class="label label-@colors[new Random().Next() % colors.Length]">@Model.Category.Name</a>
                                         @if (Model.Seminar.Any())
                                         {
-                                        <span> | 原所属专题:</span>
+                                            <span> | 原所属专题:</span>
                                             var seminars = Model.Seminar;
                                             foreach (var s in seminars)
                                             {
-                                        @Html.ActionLink(s.Seminar.Title, "Index", "Seminar", new { id = s.SeminarId }, new { @class = "label label-" + colors[new Random().Next() % colors.Length] })<text> </text>
+                                                <a asp-controller="Seminar" asp-action="Index" asp-route-id="@s.SeminarId" class="label label-@colors[new Random().Next() % colors.Length]">@s.Seminar.Title</a><text> </text>
                                             }
                                         }
                                         <div class="btn-group">
@@ -52,23 +52,23 @@
                                 @{
                                     if (!string.IsNullOrEmpty(Model.Label))
                                     {
-                                    <div class="pull-right margin-right20">
-                                        <div>
-                                            @foreach (string s in Model.Label.Split(',', ',', ' '))
+                                        <div class="pull-right margin-right20">
+                                            <div>
+                                                @foreach (string s in Model.Label.Split(',', ',', ' '))
                                                 {
                                                     if (!string.IsNullOrEmpty(s))
                                                     {
-                                            <a asp-controller="Home" asp-action="Tag" asp-route-id="@s">
-                                                <span class="label label-@colors[new Random().Next() % colors.Length]">@s</span>
-                                            </a>
+                                                        <a asp-controller="Home" asp-action="Tag" asp-route-id="@s">
+                                                            <span class="label label-@colors[new Random().Next() % colors.Length]">@s</span>
+                                                        </a>
                                                     }
                                                 }
+                                            </div>
                                         </div>
-                                    </div>
                                     }
                                 }
                             </div>
-                            <p class="text-focus text-center">您目前正在查看该文章的历史版本,文章的历史版本可能无法为您提供最准确及时的资讯,不具备任何参考价值,@Html.ActionLink("点击前往", "Details", "Post", new { id = Model.PostId }, null)该文章的最新版本。</p>
+                            <p class="text-focus text-center">您目前正在查看该文章的历史版本,文章的历史版本可能无法为您提供最准确及时的资讯,不具备任何参考价值,<a asp-controller="Post" asp-action="Details" asp-route-id="@Model.PostId">点击前往</a>该文章的最新版本。</p>
                         </header>
                         <article class="article" id="article">
                             @Html.Raw(Model.Content)
@@ -90,7 +90,7 @@
                             PostHistoryVersion prev = ViewBag.Prev;
                             if (prev != null)
                             {
-                                @Html.ActionLink(prev.Title, "HistoryVersion", "Post", new { id = prev.PostId, hid = prev.Id }, null)
+                                <a asp-controller="Post" asp-action="HistoryVersion" asp-route-id="@prev.PostId" asp-route-hid="@prev.Id">@prev.Title</a>
                             }
                             else
                             {
@@ -104,7 +104,7 @@
                             PostHistoryVersion next = ViewBag.Next;
                             if (next != null)
                             {
-                                @Html.ActionLink(next.Title, "HistoryVersion", "Post", new { id = next.PostId, hid = next.Id }, null)
+                                <a asp-controller="Post" asp-action="HistoryVersion" asp-route-id="@next.PostId" asp-route-hid="@next.Id">@next.Title</a>
                             }
                             else
                             {

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Post/Publish.cshtml

@@ -9,7 +9,7 @@
 <link href="~/Assets/semantic/semantic.min.css" rel="stylesheet" />
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <hr />

+ 9 - 10
src/Masuit.MyBlogs.Core/Views/Post/PushMerge.cshtml

@@ -7,8 +7,8 @@
 <link href="https://cdn.staticfile.org/limonte-sweetalert2/8.11.8/sweetalert2.min.css" rel="stylesheet">
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li>@Html.ActionLink(Model.Title.Length > 50 ? Model.Title.Substring(0, 50) + "..." : Model.Title, "Details", "Post", new { id = Model.Id }, null)</li>
         <li class="current"><em>创建合并请求</em></li>
     </ol>
@@ -59,6 +59,12 @@
 <script src="https://cdn.staticfile.org/limonte-sweetalert2/8.11.8/sweetalert2.min.js"></script>
 <script>
     $(function () {
+        @if(Model.DisableCopy) {
+            <text>
+        debugger;
+        CopyrightProtect4Editor();
+            </text>
+        }
         if (window.UE) {
 		    window.ue = UE.getEditor('editor', {
 			    initialFrameWidth: null
@@ -172,7 +178,7 @@
                 loadingDone();
                 return;
             }
-            $.post("/@Model.Id/pushmerge", $(this).serialize(), (data) => {
+            $.post("/@Model.Id/pushmerge", $(this).serialize(), function(data) {
                 loadingDone();
                 if (data.Success) {
                     window.notie.alert({
@@ -192,11 +198,4 @@
             });
         });
     });
-
-    @if(Model.DisableCopy) {
-        <text>
-    debugger;
-    CopyrightProtect4Editor();
-        </text>
-    }
 </script>

+ 9 - 9
src/Masuit.MyBlogs.Core/Views/Post/RepushMerge.cshtml

@@ -7,8 +7,8 @@
 <link href="https://cdn.staticfile.org/limonte-sweetalert2/8.11.8/sweetalert2.min.css" rel="stylesheet">
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
-        <li>@Html.ActionLink("文章列表", "Post", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
+        <li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
         <li>@Html.ActionLink(Model.Post.Title.Length > 50 ? Model.Post.Title.Substring(0, 50) + "..." : Model.Post.Title, "Details", "Post", new { id = Model.Post.Id }, null)</li>
         <li class="current"><em>重新编辑合并请求</em></li>
     </ol>
@@ -60,6 +60,12 @@
 <script src="https://cdn.staticfile.org/limonte-sweetalert2/8.11.8/sweetalert2.min.js"></script>
 <script>
     $(function () {
+        @if(Model.Post.DisableCopy) {
+            <text>
+        debugger;
+        CopyrightProtect4Editor();
+            </text>
+        }
         if (window.UE) {
 		    window.ue = UE.getEditor('editor', {
 			    initialFrameWidth: null
@@ -173,7 +179,7 @@
                 loadingDone();
                 return;
             }
-            $.post("/@Model.Post.Id/pushmerge", $(this).serialize(), (data) => {
+            $.post("/@Model.Post.Id/pushmerge", $(this).serialize(), function(data) {
                 loadingDone();
                 if (data.Success) {
                     window.notie.alert({
@@ -193,10 +199,4 @@
             });
         });
     });
-    @if(Model.Post.DisableCopy) {
-        <text>
-    debugger;
-    CopyrightProtect4Editor();
-        </text>
-    }
 </script>

+ 2 - 2
src/Masuit.MyBlogs.Core/Views/Search/Search.cshtml

@@ -13,7 +13,7 @@
 }
 <div class="container min-height610">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>@ViewBag.Title</em></li>
     </ol>
     <div class="wrapper wrapper-content animated fadeInRight">
@@ -67,7 +67,7 @@
                                         </h2>
                                         <div>
                                             作者:
-                                            <label class="label label-info">@Html.Raw(p.Author)</label> | 发表时间:@(p.ModifyDate.ToString("yyyy-MM-dd HH:mm")) | 分类:@(Html.ActionLink(p.CategoryName, "Category", "Home", new { id = p.CategoryId }, null))
+                                            <label class="label label-info">@Html.Raw(p.Author)</label> | 发表时间:@(p.ModifyDate.ToString("yyyy-MM-dd HH:mm")) | 分类:<a asp-controller="Home" asp-action="Category" asp-route-id="@p.CategoryId">@p.CategoryName</a>
                                         </div>
                                         <p class="size14">@Html.Raw(p.Content)</p>
                                         <div class="row">

+ 3 - 3
src/Masuit.MyBlogs.Core/Views/Seminar/Index.cshtml

@@ -34,7 +34,7 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current"><em>专题[email protected]</em></li>
     </ol>
 </div>
@@ -69,7 +69,7 @@
                 <div class="row">
                     <div class="col-md-offset-10 col-md-2">
                         <div class="btn-group pull-right">
-                            @Html.ActionLink("所有专题", "All", "Post", null, new { @class = "btn btn-info" })
+                            <a asp-controller="Post" asp-action="All" class="btn btn-info">所有专题</a>
                             <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                 排序方式<span class="caret"></span>
                             </button>
@@ -109,7 +109,7 @@
         }
         else
         {
-            <h3>Oops!抱歉~本专题没有收录相关的文章或资源!如果您有相关的结果,您可以 @Html.ActionLink("点击这里", "Publish", "Post", null, new { @class = "btn btn-info btn-lg" }) 投稿哦!</h3>
+            <h3>Oops!抱歉~本专题没有收录相关的文章或资源!如果您有相关的结果,您可以 <a asp-controller="Post" asp-action="Publish" class="btn btn-info btn-lg">点击这里</a> 投稿哦!</h3>
         }
         <div class="col-md-12 text-center">
             @{ await Html.RenderPartialAsync("_Pagination", ViewData["page"]); }

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListItem.cshtml

@@ -35,7 +35,7 @@
                     作者:<i class="icon-user-check"></i><strong class="label label-primary">
                         <a asp-controller="Home" asp-action="Author" asp-route-author="@Model.Author">@Model.Author</a>
                     </strong> <span class="text-muted">
-                        | 发表时间:<i class="fa fa-clock-o"></i> @Model.ModifyDate.ToString("yyyy-MM-dd HH:mm") | 分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model.CategoryName, "Category", "Home", new { id = Model.CategoryId }, null)
+                        | 发表时间:<i class="fa fa-clock-o"></i> @Model.ModifyDate.ToString("yyyy-MM-dd HH:mm") | 分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model.CategoryId">@Model.CategoryName</a>
                     </span>
                 </div>
                 <p>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListItem_Admin.cshtml

@@ -37,7 +37,7 @@
                         <a asp-controller="Home" asp-action="Author" asp-route-author="@Model.Author">@Model.Author</a>
                     </strong> <span class="text-muted">
                         | 发表时间:<i class="fa fa-clock-o"></i> @Model.ModifyDate.ToString("yyyy-MM-dd HH:mm") |
-                        分类:<i class="icon-map-pin"></i>@Html.ActionLink(Model.CategoryName, "Category", "Home", new { id = Model.CategoryId }, null)
+                        分类:<i class="icon-map-pin"></i><a asp-controller="Home" asp-action="Category" asp-route-id="@Model.CategoryId">@Model.CategoryName</a>
                     </span>
                 </div>
                 <p>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListPartial.cshtml

@@ -58,7 +58,7 @@
             if (list.Any())
             {
                 <div class="page-header">
-                    <h3>Oops!抱歉~没有找到相关的文章或资源!如果您有相关的结果,您可以 @Html.ActionLink("点击这里", "Publish", "Post", null, new { @class = "btn btn-info btn-lg" }) 投稿哦!以下是一些随机推荐:</h3>
+                    <h3>Oops!抱歉~没有找到相关的文章或资源!如果您有相关的结果,您可以 <a asp-controller="Post" asp-action="Publish" class="btn btn-info btn-lg">点击这里</a> 投稿哦!以下是一些随机推荐:</h3>
                 </div>
                 foreach (PostDto post in list)
                 {

+ 3 - 3
src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListPartial_Admin.cshtml

@@ -7,7 +7,7 @@
             <div class="orderby">
                 <div class="row">
                     <div class="col-md-9 text-center">
-                        @{ await Html.RenderPartialAsync("_Pagination",ViewData["page"]); }
+                        @{ await Html.RenderPartialAsync("_Pagination", ViewData["page"]); }
                     </div>
                     <div class="col-md-3">
                         <div class="btn-group pull-right">
@@ -62,7 +62,7 @@
             if (list.Any())
             {
                 <div class="page-header">
-                    <h3>Oops!抱歉~没有找到相关的文章或资源!如果您有相关的结果,您可以 @Html.ActionLink("点击这里", "Publish", "Post", null, new { @class = "btn btn-info btn-lg" }) 投稿哦!以下是一些随机推荐:</h3>
+                    <h3>Oops!抱歉~没有找到相关的文章或资源!如果您有相关的结果,您可以 <a asp-controller="Post" asp-action="Publish" class="btn btn-info btn-lg">点击这里</a> 投稿哦!以下是一些随机推荐:</h3>
                 </div>
                 foreach (PostDto post in list)
                 {
@@ -71,7 +71,7 @@
             }
         }
         <div class="col-md-12 text-center">
-            @{ await Html.RenderPartialAsync("_Pagination",ViewData["page"]); }
+            @{ await Html.RenderPartialAsync("_Pagination", ViewData["page"]); }
         </div>
     </div>
 </div>

+ 4 - 4
src/Masuit.MyBlogs.Core/Views/Shared/_Aside.cshtml

@@ -60,12 +60,12 @@
             </div>
             <div class="panel-body">
                 <ul class="list-group">
-                    @foreach (CategoryDto cat in Model.Categories)
+                    @foreach (var cat in Model.Categories)
                     {
                         if (cat.PendedPostCount > 0)
                         {
                             <li class="list-group-item">
-                                <a asp-controller="Home" asp-action="Category" asp-route-id="@cat.Id">@cat.Name (@cat.PendedPostCount)</a>
+                                <a asp-controller="Home" asp-action="Category" asp-route-id="@cat.Id">@cat.Name (@cat.PendedPostCount)</a>
                                 <a class="pull-right" asp-controller="Subscribe" asp-action="CategoryRss" asp-route-id="@cat.Id" target="_blank">
                                     <i class="icon-rss4"></i>
                                 </a>
@@ -133,7 +133,7 @@
     <section class="wow animated fadeIn">
         <article class="panel panel-primary">
             <div class="panel-heading">
-                <i class="icon-lightbulb"></i>标签云 @Html.ActionLink("所有标签", "All", "Post", null, new { @class = "pull-right text-white" })
+                <i class="icon-lightbulb"></i>标签云 <a asp-controller="Post" asp-action="All" class="pull-right text-white">所有标签</a>
             </div>
             <div class="panel-body text-center">
                 <div id="tagscloud">
@@ -181,7 +181,7 @@
     <section class="wow animated fadeIn">
         <article class="panel panel-primary">
             <div class="panel-heading">
-                <i class="icon-coin-yen"></i>支付宝支持本站 @Html.ActionLink("更多方式", "Donate", "Misc", null, new { @class = "pull-right text-white" })
+                <i class="icon-coin-yen"></i>支付宝支持本站 <a asp-controller="Misc" asp-action="Donate" class="pull-right text-white">更多方式</a>
             </div>
             <div class="panel-body">
                 <img class="img img-responsive img-thumbnail" src="@CommonHelper.SystemSettings["Donate"]" alt="@CommonHelper.SystemSettings["Title"]" title="@CommonHelper.SystemSettings["Title"]" />

+ 8 - 8
src/Masuit.MyBlogs.Core/Views/Tools/Address.cshtml

@@ -12,18 +12,18 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current">
             <em>@ViewBag.Title</em>
         </li>
     </ol>
-        <ul class="list-group">
-            <li class="list-group-item">
-                <p class="size24">
-                    如果你觉得这个工具有用,请 @Html.ActionLink("点击这里", "Donate", "Misc") 支持一下博主!
-                </p>
-            </li>
-        </ul>
+    <ul class="list-group">
+        <li class="list-group-item">
+            <p class="size24">
+                如果你觉得这个工具有用,请 <a asp-controller="Misc" asp-action="Donate">点击这里</a> 支持一下博主!
+            </p>
+        </li>
+    </ul>
     <form method="get">
         <div class="input-group">
             <input class="form-control" name="addr" value="@ViewBag.Address" placeholder="请输入有效地理位置" />

+ 17 - 13
src/Masuit.MyBlogs.Core/Views/Tools/GetIPInfo.cshtml

@@ -12,27 +12,28 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current">
             <em>@ViewBag.Title</em>
         </li>
     </ol>
-        <ul class="list-group">
-            <li class="list-group-item">
-                <p class="size24">
-                    如果你觉得这个工具有用,请 @Html.ActionLink("点击这里", "Donate", "Misc") 支持一下博主!
-                </p>
-            </li>
-        </ul>
+    <ul class="list-group">
+        <li class="list-group-item">
+            <p class="size24">
+                如果你觉得这个工具有用,请 <a asp-controller="Misc" asp-action="Donate">点击这里</a> 支持一下博主!
+            </p>
+        </li>
+    </ul>
     <form method="get">
         <div class="input-group">
-            <input class="form-control" name="ip" value="@ViewBag.IP" placeholder="请输入有效的IPv4地址"/>
+            <input class="form-control" name="ip" value="@ViewBag.IP" placeholder="请输入有效的IPv4地址" />
             <span class="input-group-btn">
                 <button class="btn btn-info" type="submit">查询</button>
             </span>
         </div>
     </form>
-    @if(Model != null && Model.Status == 0) {
+    @if (Model != null && Model.Status == 0)
+    {
         int count = 0;
         <table class="table table-bordered table-condensed table-hover">
             <tr>
@@ -47,15 +48,18 @@
                 <td>经纬度:</td>
                 <td>(经度:@(Model.AddressResult.Location?.Lng),纬度:@(Model.AddressResult.Location?.Lat))</td>
             </tr>
-            @foreach(Pois poi in Model.AddressResult.Pois) {
+            @foreach (Pois poi in Model.AddressResult.Pois)
+            {
                 <tr>
                     <td>参考地理位置@(++count):</td>
                     <td>@poi.AddressDetail</td>
                 </tr>
             }
         </table>
-        
-    } else {
+
+    }
+    else
+    {
         <span class="text-danger">@ViewBag.IP 不在国内或者不是一个有效的IPv4外网地址</span>
     }
 </div>

+ 8 - 8
src/Masuit.MyBlogs.Core/Views/Tools/Position.cshtml

@@ -13,18 +13,18 @@
 </style>
 <div class="container">
     <ol class="cd-breadcrumb triangle">
-        <li>@Html.ActionLink("首页", "Index", "Home")</li>
+        <li><a asp-controller="Home" asp-action="Index">首页</a></li>
         <li class="current">
             <em>@ViewBag.Title</em>
         </li>
     </ol>
-        <ul class="list-group">
-            <li class="list-group-item">
-                <p class="size24">
-                    如果你觉得这个工具有用,请 @Html.ActionLink("点击这里", "Donate", "Misc") 支持一下博主!
-                </p>
-            </li>
-        </ul>
+    <ul class="list-group">
+        <li class="list-group-item">
+            <p class="size24">
+                如果你觉得这个工具有用,请 <a asp-controller="Misc" asp-action="Donate">点击这里</a> 支持一下博主!
+            </p>
+        </li>
+    </ul>
     @if (Model != null && Model.Status == 0)
     {
         <form method="get">

+ 15 - 15
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.js

@@ -26,7 +26,7 @@
 					time: 4
 				});
 			}
-		}, () => {
+		}, function() {
             window.notie.alert({
 				type: 3,
 				text: "请求失败,请稍候再试!",
@@ -65,7 +65,7 @@
 					time: 4
 				});
 			}
-		}, () => {
+		}, function() {
             window.notie.alert({
 				type: 3,
 				text: "请求失败,请稍候再试!",
@@ -169,7 +169,7 @@
 		}
 
 		localStorage.setItem("user",  JSON.stringify(formData));
-		window.post("/comment/put", formData, (data) => {
+		window.post("/comment/put", formData, function(data) {
 			loadingDone();
 			if (data.Success) {
 				window.notie.alert({
@@ -190,7 +190,7 @@
 					time: 4
 				});
 			}
-		}, () => {
+		}, function() {
             window.notie.alert({
 				type: 3,
 				text: "请求失败,请稍候再试!",
@@ -218,7 +218,7 @@
 			}, function() {
 				swal("您的打赏将会支持本站做的更好!", null, "error");
 			});
-		}, () => {
+		}, function() {
             window.notie.alert({
 				type: 3,
 				text: "请求失败,请稍候再试!",
@@ -235,7 +235,7 @@
 function submitComment(_this) {
 	loading();
 	localStorage.setItem("user", JSON.stringify($(_this).serializeObject()));
-	window.post("/comment/put", $(_this).serializeObject(), (data) => {
+	window.post("/comment/put", $(_this).serializeObject(), function(data) {
 		loadingDone();
 		if (data.Success) {
 			window.notie.alert({
@@ -254,7 +254,7 @@ function submitComment(_this) {
 				time: 4
 			});
 		}
-	}, () => {
+	}, function() {
         window.notie.alert({
 			type: 3,
 			text: "请求失败,请稍候再试!",
@@ -303,7 +303,7 @@ function bindReplyBtn() {
 //绑定评论投票
 function commentVoteBind() {
 	$(".cmvote").on("click", function(e) {
-		window.post("/comment/CommentVote", { id: $(this).data("id") }, (data) => {
+		window.post("/comment/CommentVote", { id: $(this).data("id") }, function(data) {
 			if (data) {
 				if (data.Success) {
 					console.log($(this).children("span.count"));
@@ -324,7 +324,7 @@ function commentVoteBind() {
 				}
 			}
 		});
-	}, () => {
+	}, function() {
         window.notie.alert({
 			type: 3,
 			text: "请求失败,请稍候再试!",
@@ -335,7 +335,7 @@ function commentVoteBind() {
 
 function bindVote() {
     $("#voteup").on("click", function(e) {
-        window.post("/post/voteup", { id: $("#postId").val() }, (data) => {
+        window.post("/post/voteup", { id: $("#postId").val() }, function(data) {
 			if (data) {
 				if (data.Success) {
 					$(this).children()[1].innerText = parseInt($(this).children()[1].innerText) + 1;
@@ -354,7 +354,7 @@ function bindVote() {
 					});
 				}
 			}
-		}, () => {
+		}, function() {
             window.notie.alert({
 				type: 3,
 				text: "请求失败,请稍候再试!",
@@ -363,7 +363,7 @@ function bindVote() {
         });
 	});
     $("#votedown").on("click", function(e) {
-        window.post("/post/votedown", { id: $("#postId").val() }, (data) => {
+        window.post("/post/votedown", { id: $("#postId").val() }, function(data) {
 			if (data) {
 				if (data.Success) {
 					$(this).children()[1].innerText = parseInt($(this).children()[1].innerText) + 1;
@@ -382,7 +382,7 @@ function bindVote() {
 					});
 				}
 			}
-		}, () => {
+		}, function() {
             window.notie.alert({
 				type: 3,
 				text: "请求失败,请稍候再试!",
@@ -398,7 +398,7 @@ function loadParentComments(data) {
     loading();
     var html = '';
 	if (data) {
-        var rows = Enumerable.From(data.rows).Where(c => c.ParentId === 0).ToArray();
+		var rows = Enumerable.From(data.rows).Where(function (c) {return c.ParentId === 0}).ToArray();
         var page = data.page;
         var size = data.size;
         var maxPage = Math.ceil(data.total / size);
@@ -433,7 +433,7 @@ function loadComments(data, comments, root, depth = 0) {
     var floor = 1;
     depth++;
     var html = '';
-    Enumerable.From(comments).ForEach((item, index) => {
+    Enumerable.From(comments).ForEach(function(item, index) {
 	    var color = colors[depth%5];
 		html += `<article id="${item.Id}" class="panel panel-${color}">
                         <div class="panel-heading">

File diff suppressed because it is too large
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.min.js


+ 92 - 146
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/scripts.js

@@ -93,7 +93,7 @@ $(function() {
                         time: 4
                     });
                 }
-            }, () => {
+            }, function() {
                 window.notie.alert({
 					type: 3,
 					text: "请求失败,请稍候再试!",
@@ -249,43 +249,119 @@ function loadingDone() {
     $(".loading1").hide();
 }
 
+/**禁止复制 */
+function CopyrightProtect() {
+    setInterval(function() {
+        document.onkeydown = function(e){
+            var currKey=0,evt=e||window.event;
+            currKey=evt.keyCode||evt.which||evt.charCode;
+            if (currKey == 123||( event.ctrlKey&&currKey==67 )||( event.ctrlKey&&currKey==85 )||( event.ctrlKey&&event.shiftKey)||event.altKey ){
+                window.event.cancelBubble = true;
+                event.returnValue = false;
+                return false;
+            }
+        }
+        document.ondragstart = function(){
+            event.returnValue = false;
+            return false;
+        }
+        document.oncopy = function(){
+            event.returnValue = false;
+            return false;
+        }
+        document.oncontextmenu = function(){
+            event.returnValue = false;
+            return false;
+        }
+    },100);
+}
+
+/**禁止编辑器内复制 */
+function CopyrightProtect4Editor() {
+    setInterval(function() {
+        document.getElementById("ueditor_0").contentWindow.document.body.onkeydown = function(e){
+            var currKey=0,evt=e||window.event;
+            currKey=evt.keyCode||evt.which||evt.charCode;
+            if (currKey == 123||( event.ctrlKey&&currKey==67 )||( event.ctrlKey&&currKey==85)|| (event.ctrlKey&&currKey==88)||( event.ctrlKey&&event.shiftKey)|| event.altKey ){
+                window.event.cancelBubble = true;
+                window.event.returnValue = false;
+                return false;
+            }
+        }
+        document.getElementById("ueditor_0").contentWindow.document.body.ondragstart = function(){
+            event.returnValue = false;
+            return false;
+        }
+        document.getElementById("ueditor_0").contentWindow.document.body.oncopy = function(){
+            event.returnValue = false;
+            return false;
+        }
+    },100);
+}
+
+/**禁止全局复制 */
+function GlobalCopyrightProtect() {
+    setInterval(function() {
+        document.onkeydown = function(e){
+            var currKey=0,evt=e||window.event;
+            currKey=evt.keyCode||evt.which||evt.charCode;
+            if (currKey == 123||( event.ctrlKey&&currKey==67 )|| (event.ctrlKey&&currKey==85)||event.ctrlKey||(event.ctrlKey&&event.shiftKey)||event.altKey ){
+                window.event.cancelBubble = true;
+                window.event.returnValue = false;
+                return false;
+            }
+        }
+        document.ondragstart = function(){
+            event.returnValue = false;
+            return false;
+        }
+        document.oncopy = function(){
+            event.returnValue = false;
+            return false;
+        }
+        document.oncontextmenu = function(){
+            event.returnValue = false;
+            return false;
+        }
+    },100);
+}
 function GetOperatingSystem(os) {
     if (os) {
         if (os.indexOf("Windows") >= 0) {
-            return `<i class="icon-windows8"></i>${os}`;
+            return '<i class="icon-windows8"></i>'+os;
         } else if (os.indexOf("Mac") >= 0) {
-            return `<i class="icon-apple"></i>${os}`;
+            return '<i class="icon-apple"></i>'+os;
         } else if (os.indexOf("Chrome") >= 0) {
-            return `<i class="icon-chrome"></i>${os}`;
+            return '<i class="icon-chrome"></i>'+os;
         } else if (os.indexOf("Android") >= 0) {
-            return `<i class="icon-android"></i>${os}`;
+            return '<i class="icon-android"></i>'+os;
         } else {
-            return `<i class="icon-stats"></i>${os}`;
+            return '<i class="icon-stats"></i>'+os;
         }
     } else {
-        return `<i class="icon-stats"></i>未知操作系统`;
+        return '<i class="icon-stats"></i>未知操作系统';
     }
 }
 
 function GetBrowser(browser) {
     if (browser) {
         if (browser.indexOf("Chrome") >= 0) {
-            return `<i class="icon-chrome"></i>${browser}`;
+            return '<i class="icon-chrome"></i>'+browser;
         } else if (browser.indexOf("Firefox") >= 0) {
-            return `<i class="icon-firefox"></i>${browser}`;
+            return '<i class="icon-firefox"></i>'+browser;
         } else if (browser.indexOf("IE") >= 0) {
-            return `<i class="icon-IE"></i>${browser}`;
+            return '<i class="icon-IE"></i>'+browser;
         } else if (browser.indexOf("Edge") >= 0) {
-            return `<i class="icon-edge"></i>${browser}`;
+            return '<i class="icon-edge"></i>'+browser;
         } else if (browser.indexOf("Opera") >= 0) {
-            return `<i class="icon-opera"></i>${browser}`;
+            return '<i class="icon-opera"></i>'+browser;
         } else if (browser.indexOf("Safari") >= 0) {
-            return `<i class="icon-safari"></i>${browser}`;
+            return '<i class="icon-safari"></i>'+browser;
         } else {
-            return `<i class="icon-browser2"></i>${browser}`;
+            return '<i class="icon-browser2"></i>'+browser;
         }
     } else {
-        return `<i class="icon-browser2"></i>未知浏览器`;
+        return '<i class="icon-browser2"></i>未知浏览器';
     }
 }
 
@@ -318,7 +394,7 @@ function popBrowserTips() {
 
 function post(url, params, callback, error) {
     var formData = new FormData();
-    Object.keys(params).forEach((key) => {
+    Object.keys(params).forEach(function(key) {
         formData.append(key, params[key]);
     });
     window.fetch(url, {
@@ -338,136 +414,6 @@ function post(url, params, callback, error) {
     });
 }
 
-/**禁止全局复制 */
-function GlobalCopyrightProtect() {
-    setInterval(function() {
-        document.onkeydown = function(e){
-            var currKey=0,evt=e||window.event;
-            currKey=evt.keyCode||evt.which||evt.charCode;
-            if (currKey == 123) {
-                window.event.cancelBubble = true;
-                window.event.returnValue = false;
-            }
-            if( event.ctrlKey&&currKey==67 ){
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&currKey==85 ){
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey ){
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&event.shiftKey){
-                event.returnValue = false;
-                return false;
-            }
-            if ( event.altKey ){
-                event.returnValue = false;
-                return false;
-            }
-        }
-        document.ondragstart = function(){
-            event.returnValue = false;
-            return false;
-        }
-        document.oncopy = function(){
-            event.returnValue = false;
-            return false;
-        }
-        document.oncontextmenu = function(){
-            event.returnValue = false;
-            return false;
-        }
-    },100);
-}
-
-/**禁止复制 */
-function CopyrightProtect() {
-    setInterval(function() {
-        document.onkeydown = function(e){
-            var currKey=0,evt=e||window.event;
-            currKey=evt.keyCode||evt.which||evt.charCode;
-            if (currKey == 123) {
-                window.event.cancelBubble = true;
-                window.event.returnValue = false;
-            }
-            if( event.ctrlKey&&currKey==67 ){//C
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&currKey==85 ){//U
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&event.shiftKey){
-                event.returnValue = false;
-                return false;
-            }
-            if ( event.altKey ){
-                event.returnValue = false;
-                return false;
-            }
-        }
-        document.ondragstart = function(){
-            event.returnValue = false;
-            return false;
-        }
-        document.oncopy = function(){
-            event.returnValue = false;
-            return false;
-        }
-        document.oncontextmenu = function(){
-            event.returnValue = false;
-            return false;
-        }
-    },100);
-}
-
-/**禁止编辑器内复制 */
-function CopyrightProtect4Editor() {
-    setInterval(function() {
-        document.getElementById("ueditor_0").contentWindow.document.body.onkeydown = function(e){
-            var currKey=0,evt=e||window.event;
-            currKey=evt.keyCode||evt.which||evt.charCode;
-            if (currKey == 123) {
-                window.event.cancelBubble = true;
-                window.event.returnValue = false;
-            }
-            if( event.ctrlKey&&currKey==67 ){ //C
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&currKey==85 ){ //U
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&currKey==88 ){ //X
-                event.returnValue = false;
-                return false;
-            }
-            if( event.ctrlKey&&event.shiftKey){
-                event.returnValue = false;
-                return false;
-            }
-            if ( event.altKey ){
-                event.returnValue = false;
-                return false;
-            }
-        }
-        document.getElementById("ueditor_0").contentWindow.document.body.ondragstart = function(){
-            event.returnValue = false;
-            return false;
-        }
-        document.getElementById("ueditor_0").contentWindow.document.body.oncopy = function(){
-            event.returnValue = false;
-            return false;
-        }
-    },100);
-}
-
 /**
  * 鼠标桃心
  */

Some files were not shown because too many files changed in this diff