diff --git a/public/images/wx.png b/public/images/wx.png new file mode 100644 index 0000000..7392b83 Binary files /dev/null and b/public/images/wx.png differ diff --git a/public/images/zfb.png b/public/images/zfb.png new file mode 100644 index 0000000..7b74c47 Binary files /dev/null and b/public/images/zfb.png differ diff --git a/public/scripts/controllers/advice-controller.js b/public/scripts/controllers/advice-controller.js index e8656fe..54dab62 100644 --- a/public/scripts/controllers/advice-controller.js +++ b/public/scripts/controllers/advice-controller.js @@ -1,5 +1,9 @@ app.controller('adviceCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $timeout, bookmarkService, pubSubService, dataService) { console.log("Hello adviceCtr"); + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; + return; + } var maxSelections = 3; $scope.comment = ''; diff --git a/public/scripts/controllers/bookmarks-controller.js b/public/scripts/controllers/bookmarks-controller.js index 558ddda..fd6778c 100644 --- a/public/scripts/controllers/bookmarks-controller.js +++ b/public/scripts/controllers/bookmarks-controller.js @@ -1,7 +1,6 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) { console.log("Hello bookmarksCtr...", $stateParams); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ + if(dataService.smallDevice()){ $window.location = "http://m.mybookmark.cn/#/tags"; return; } diff --git a/public/scripts/controllers/home-controller.js b/public/scripts/controllers/home-controller.js index a64e5eb..077bdef 100644 --- a/public/scripts/controllers/home-controller.js +++ b/public/scripts/controllers/home-controller.js @@ -1,9 +1,7 @@ app.controller('homeCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $stateParams, $filter, $state, $window, bookmarkService, pubSubService, dataService) { console.log('Hello homeCtr......'); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ - toastr.success(JSON.stringify(browser), "提示"); - $window.location = "http://m.mybookmark.cn"; + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; return; } bookmarkService.autoLogin() diff --git a/public/scripts/controllers/hot-controller.js b/public/scripts/controllers/hot-controller.js index 2665f69..f37646e 100644 --- a/public/scripts/controllers/hot-controller.js +++ b/public/scripts/controllers/hot-controller.js @@ -1,7 +1,6 @@ app.controller('hotCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) { console.log("Hello hotCtr..."); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ + if(dataService.smallDevice()){ $window.location = "http://m.mybookmark.cn/#/tags"; return; } diff --git a/public/scripts/controllers/login-controller.js b/public/scripts/controllers/login-controller.js index 18a231d..812a0c0 100644 --- a/public/scripts/controllers/login-controller.js +++ b/public/scripts/controllers/login-controller.js @@ -1,8 +1,7 @@ app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', '$window', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $filter, $state, $cookieStore, $window, bookmarkService, pubSubService, dataService) { console.log("Hello loginCtr...", $cookieStore.get("username")); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ - $window.location = "http://m.mybookmark.cn/#/login"; + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; return; } diff --git a/public/scripts/controllers/note-controller.js b/public/scripts/controllers/note-controller.js index b1cca1f..97b788a 100644 --- a/public/scripts/controllers/note-controller.js +++ b/public/scripts/controllers/note-controller.js @@ -1,8 +1,7 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function ($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) { console.log("Hello noteCtr...", $stateParams); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ - $window.location = "http://m.mybookmark.cn/#/note"; + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; return; } diff --git a/public/scripts/controllers/praise-controller.js b/public/scripts/controllers/praise-controller.js index 8e78c7f..fe68b1c 100644 --- a/public/scripts/controllers/praise-controller.js +++ b/public/scripts/controllers/praise-controller.js @@ -1,6 +1,9 @@ app.controller('praiseCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, ngDialog, bookmarkService, pubSubService, dataService) { console.log("Hello praiseCtr...", $stateParams); - + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; + return; + } bookmarkService.autoLogin() .then((data) => { var login = data.logined; diff --git a/public/scripts/controllers/search-controller.js b/public/scripts/controllers/search-controller.js index 0bb477c..1d64c3d 100644 --- a/public/scripts/controllers/search-controller.js +++ b/public/scripts/controllers/search-controller.js @@ -1,8 +1,7 @@ app.controller('searchCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) { console.log("Hello searchCtr...", $stateParams); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ - $window.location = "http://m.mybookmark.cn/#/search"; + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; return; } diff --git a/public/scripts/controllers/settings-controller.js b/public/scripts/controllers/settings-controller.js index 1304f65..2c8d9f3 100644 --- a/public/scripts/controllers/settings-controller.js +++ b/public/scripts/controllers/settings-controller.js @@ -1,13 +1,12 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', '$timeout', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $stateParams, $filter, $state, $window, $timeout, bookmarkService, pubSubService, dataService) { console.log('Hello settingsCtr......', $stateParams); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ - $window.location = "http://m.mybookmark.cn/#/settings"; + if(dataService.smallDevice()){ + $window.location = "http://m.mybookmark.cn/#/tags"; return; } $scope.forbidQuickKey = dataService.forbidQuickKey - $scope.form = [false, false, false, false, false, false]; + $scope.form = [false, false, false, false, false, false, false]; $scope.passwordOrgin = ""; $scope.passwordNew1 = ""; $scope.passwordNew2 = ""; diff --git a/public/scripts/controllers/tags-controller.js b/public/scripts/controllers/tags-controller.js index 61145b0..89ca4e2 100644 --- a/public/scripts/controllers/tags-controller.js +++ b/public/scripts/controllers/tags-controller.js @@ -1,7 +1,6 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function ($scope, $filter, $window, $stateParams, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) { console.log("Hello tagsCtr...", $stateParams); - var browser = dataService.browser(); - if(browser.mobile && !browser.iPad){ + if(dataService.smallDevice()){ $window.location = "http://m.mybookmark.cn/#/tags"; return; } diff --git a/public/scripts/services/data-service.js b/public/scripts/services/data-service.js index 5ef303f..e7644b8 100644 --- a/public/scripts/services/data-service.js +++ b/public/scripts/services/data-service.js @@ -33,9 +33,6 @@ app.factory('dataService', [function() { }, { uiSref: 'advice', title: '留言' - }, { - uiSref: 'praise', - title: '咖啡' }], notLoginMenus: [{ uiSref: '/', @@ -133,10 +130,10 @@ app.factory('dataService', [function() { $("#clipboard").attr("data-clipboard-text", text); document.getElementById("clipboard").click(); }, - browser: function() { - var u = navigator.userAgent, - app = navigator.appVersion; - return { //移动终端浏览器版本信息 + smallDevice: function() { + var u = navigator.userAgent; + var app = navigator.appVersion; + var device = { //移动终端浏览器版本信息 trident: u.indexOf('Trident') > -1, //IE内核 presto: u.indexOf('Presto') > -1, //opera内核 webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 @@ -148,6 +145,12 @@ app.factory('dataService', [function() { iPad: u.indexOf('iPad') > -1, //是否iPad webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部 }; + + if((device.mobile && !device.iPad) || (screen && screen.availWidth < 768)){ + return true; + } + + return false; } }; diff --git a/public/views/settings.html b/public/views/settings.html index 02bc9f0..e586de7 100644 --- a/public/views/settings.html +++ b/public/views/settings.html @@ -14,6 +14,8 @@ 更新日志 + 请喝咖啡 +
@@ -214,6 +216,44 @@ 更早日志
+
+

赞赏说明

+

赞赏金额主要用于服务器的租用与域名的费用,对于赞赏有以下几点说明:

+

1、目前租用的服务器Vultr,每月5$,折合人名币大概35元/月。如果有新用户想购买Vultr服务器的,可以点击链接进行购买,这样你我将都能得到10$。域名mybookmark.cn我花151元买了五年,2021年11月份到期。

+

2、由于目前的服务器在国外,导致有时候访问比较慢,如果赞赏金融余额能支撑起在国内租用服务器费用,将在国内租用一个服务器,以提高访问速度。如果有能提供国内免费服务器的更佳!

+

3、对于开发计划,优先开发赞赏用户提出的需求,当然需要我自己同意加入开发计划。

+

4、赞赏用户的一些其他特权(暂未开发),如:可以自定义网站背景,可自定义更多的分类(目前上限为30个)。

+

5、赞赏转账的时候,请留言至少添加“书签赞赏”这四个汉字,以供我做区分。赞赏之后我会及时将赞赏信息更新到网站上,如果有遗漏,可联系我微信QQ530485521或者在留言版块说明。

+

赞赏二维码

+
+
+
微信
+
+
支付宝
+
+
+

赞赏排行版

+ + + + + + + + + + + + + + + + + + + +
用户昵称赞赏日期赞赏金融(人民币)留言说明
lcq泥巴2017-03-01 12:03:08210本人用于服务器租用
+