Commit bd016bb5 authored by Van's avatar Van

🎨 fix #12620

parent 0ba0ac12
......@@ -20,8 +20,9 @@
-->
<!--
Description: Static resources definition.
Version: 2.7.6.6, Dec 10, 2016
Version: 2.8.0.60, Jan 13, 2019
Author: Liang Ding
Author: Liyuan Li
-->
<static-files>
<!-- Uses the STANDARD Ant Path Pattern to configure these paths! -->
......@@ -29,6 +30,7 @@
<include path="/favicon.ico"/>
<include path="/favicon.png"/>
<include path="/robots.txt"/>
<include path="/sw.js"/>
<include path="/manifest.json"/>
<include path="/js/**.js"/>
......
This diff is collapsed.
......@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.4.1.1, Oct 27, 2018
* @version 1.5.0.0, Jan 13, 2019
*/
/**
......@@ -322,6 +322,15 @@ var Util = {
Util.killIE();
Util.setTopBar();
Util.parseMarkdown();
Util.initSW();
},
/**
* @description 注册 Service Work
*/
initSW: function () {
if (navigator.serviceWorker) {
navigator.serviceWorker.register('/sw.js', {scope: '/'});
}
},
/**
* @description 替换侧边栏表情为图片
......
This diff is collapsed.
Subproject commit 889f6c797b8d9f7a661880a54940b9063f58b63d
Subproject commit 91f7a9f828d35f16a810d82fa7f9854612df6d97
/*
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* @fileoverview 注册 Service Work,目前为空,只为触发添加到桌面。
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Jan 13, 2019
*/
self.addEventListener('fetch', function (event) {
// fix 'cannot be installed: does not work offline'
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment