diff --git a/app/libs/iosOverlay/iosOverlay.css b/app/libs/iosOverlay/iosOverlay.css deleted file mode 100755 index c8a38b4..0000000 --- a/app/libs/iosOverlay/iosOverlay.css +++ /dev/null @@ -1,107 +0,0 @@ -.ui-ios-overlay { - z-index: 99999; - position: fixed; - top: 50%; - left: 50%; - width: 250px; - height: 200px; - margin-left: -100px; - margin-top: -100px; - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#cc000000,endColorstr=#cc000000); - background: rgba(0,0,0,0.8); - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; -} -.ui-ios-overlay .title { - color: #FFF; - font-weight: bold; - text-align: center; - display: block; - font-size: 20px; - position: absolute; - bottom: 30px; - left: 0; - width: 100%; -} -.ui-ios-overlay img { - display: block; - margin: 20% auto 0 auto; -} -.ui-ios-overlay .spinner { - left: 50% !important; - top: 40% !important; -} - -.ios-overlay-show { - -webkit-animation-name: ios-overlay-show; - -webkit-animation-duration: 750ms; - -moz-animation-name: ios-overlay-show; - -moz-animation-duration: 750ms; - -ms-animation-name: ios-overlay-show; - -ms-animation-duration: 750ms; - -o-animation-name: ios-overlay-show; - -o-animation-duration: 750ms; - animation-name: ios-overlay-show; - animation-duration: 750ms; -} - -@-webkit-keyframes ios-overlay-show { - 0% { opacity: 0; } - 100% { opacity: 1; } -} -@-moz-keyframes ios-overlay-show { - 0% { opacity: 0; } - 100% { opacity: 1; } -} -@-ms-keyframes ios-overlay-show { - 0% { opacity: 0; } - 100% { opacity: 1; } -} -@-o-keyframes ios-overlay-show { - 0% { opacity: 0; } - 100% { opacity: 1; } -} -@keyframes ios-overlay-show { - 0% { opacity: 0; } - 100% { opacity: 1; } -} - -.ios-overlay-hide { - -webkit-animation-name: ios-overlay-hide; - -webkit-animation-duration: 750ms; - -webkit-animation-fill-mode: forwards; - -moz-animation-name: ios-overlay-hide; - -moz-animation-duration: 750ms; - -moz-animation-fill-mode: forwards; - -ms-animation-name: ios-overlay-hide; - -ms-animation-duration: 750ms; - -ms-animation-fill-mode: forwards; - -o-animation-name: ios-overlay-hide; - -o-animation-duration: 750ms; - -o-animation-fill-mode: forwards; - animation-name: ios-overlay-hide; - animation-duration: 750ms; - animation-fill-mode: forwards; -} - -@-webkit-keyframes ios-overlay-hide { - 0% { opacity: 1; } - 100% { opacity: 0; } -} -@-moz-keyframes ios-overlay-hide { - 0% { opacity: 1; } - 100% { opacity: 0; } -} -@-ms-keyframes ios-overlay-hide { - 0% { opacity: 1; } - 100% { opacity: 0; } -} -@-o-keyframes ios-overlay-hide { - 0% { opacity: 1; } - 100% { opacity: 0; } -} -@keyframes ios-overlay-hide { - 0% { opacity: 1; } - 100% { opacity: 0; } -} diff --git a/app/libs/iosOverlay/iosOverlay.js b/app/libs/iosOverlay/iosOverlay.js deleted file mode 100755 index da376e1..0000000 --- a/app/libs/iosOverlay/iosOverlay.js +++ /dev/null @@ -1,151 +0,0 @@ -/*global $*/ -/*jshint unused:false,forin:false*/ - -var iosOverlay = function(params) { - - 'use strict'; - - var overlayDOM; - var noop = function() {}; - var defaults = { - onbeforeshow: noop, - onshow: noop, - onbeforehide: noop, - onhide: noop, - text: '', - icon: null, - spinner: null, - duration: null, - id: null, - parentEl: null - }; - - // helper - merge two objects together, without using $.extend - var merge = function (obj1, obj2) { - var obj3 = {}; - for (var attrOne in obj1) { obj3[attrOne] = obj1[attrOne]; } - for (var attrTwo in obj2) { obj3[attrTwo] = obj2[attrTwo]; } - return obj3; - }; - - // helper - does it support CSS3 transitions/animation - var doesTransitions = (function() { - var b = document.body || document.documentElement; - var s = b.style; - var p = 'transition'; - if (typeof s[p] === 'string') { return true; } - - // Tests for vendor specific prop - var v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms']; - p = p.charAt(0).toUpperCase() + p.substr(1); - for(var i=0; i'; - } else if (params.spinner) { - overlayDOM.appendChild(params.spinner.el); - } - if (doesTransitions) { - overlayDOM.addEventListener('webkitAnimationEnd', handleAnim, false); - overlayDOM.addEventListener('msAnimationEnd', handleAnim, false); - overlayDOM.addEventListener('oAnimationEnd', handleAnim, false); - overlayDOM.addEventListener('animationend', handleAnim, false); - } - if (params.parentEl) { - document.getElementById(params.parentEl).appendChild(overlayDOM); - } else { - document.body.appendChild(overlayDOM); - } - - settings.onbeforeshow(); - // begin fade in - if (doesTransitions) { - overlayDOM.className += ' ios-overlay-show'; - } else if (typeof $ === 'function') { - $(overlayDOM).fadeIn({ - duration: 200 - }, function() { - settings.onshow(); - }); - } - - if (settings.duration) { - window.setTimeout(function() { - hide(); - },settings.duration); - } - - }()); - - var hide = function() { - // pre-callback - settings.onbeforehide(); - // fade out - if (doesTransitions) { - // CSS animation bound to classes - overlayDOM.className = overlayDOM.className.replace('show','hide'); - } else if (typeof $ === 'function') { - // polyfill requires jQuery - $(overlayDOM).fadeOut({ - duration: 200 - }, function() { - destroy(); - settings.onhide(); - }); - } - }; - - var destroy = function() { - if (params.parentEl) { - document.getElementById(params.parentEl).removeChild(overlayDOM); - } else { - document.body.removeChild(overlayDOM); - } - }; - - var update = function(params) { - if (params.text) { - overlayDOM.getElementsByTagName('span')[0].innerHTML = params.text; - } - if (params.icon) { - if (settings.spinner) { - // Unless we set spinner to null, this will throw on the second update - settings.spinner.el.parentNode.removeChild(settings.spinner.el); - settings.spinner = null; - } - overlayDOM.innerHTML += ''; - } - }; - - return { - hide: hide, - destroy: destroy, - update: update - }; - -}; diff --git a/app/libs/spinjs/.jshintrc b/app/libs/spinjs/.jshintrc deleted file mode 100755 index 69cfbe7..0000000 --- a/app/libs/spinjs/.jshintrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - /* Additional globals */ - "predef": [ - "define", - "module" - ], - - /* Enforcing Options */ - - "immed" : true, // Switches on warnings for immediately invoked functions which are not wrapped in parenthesis - "latedef" : true, // Switches on warnings for using variables or functions prior of their definition - "newcap" : true, // Switches on warnings if uncapitalised constructor function names are being used - "noarg" : true, // Switches on warnings when arguments.caller and arguments.callee are being used - "nonew" : true, // Switches on warnings when no "new" keyword is being used for constructor functions - "regexp" : true, // Switches on warnings for unsafe usage of '.' in regular expressions - "undef" : true, // Switches on warnings when using undeclared variables - "trailing" : true, // Switches on warnings for using trailing whitespace at the end of lines - - /* Relaxing Options */ - - "asi" : true, // Switches off warnings about missing semi-colons - "boss" : true, // Switches off warnings about assignments in places where conditions are expected - "evil" : true, // Switches off warnings about the use of eval - "expr" : true, // Switches off warnings when using expressions in places where assignments are expected - "laxbreak" : true, // Switches off warnings about improper line breaks - "laxcomma" : true, // Switches off warnings about leading commas in multi-line var declarations - "loopfunc" : true, // Switches off warnings about functions inside of loops - "proto" : true, // Switches off warnings when using the __proto__ property - - /* Environments */ - - "browser" : true // Allows the use of undefined globals exposed by modern browsers, i.e. window -} diff --git a/app/libs/spinjs/LICENSE.txt b/app/libs/spinjs/LICENSE.txt deleted file mode 100755 index 9457b39..0000000 --- a/app/libs/spinjs/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2011-2014 Felix Gnass [fgnass at neteye dot de] - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/app/libs/spinjs/spin.js b/app/libs/spinjs/spin.js deleted file mode 100755 index a3812e2..0000000 --- a/app/libs/spinjs/spin.js +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Copyright (c) 2011-2014 Felix Gnass - * Licensed under the MIT license - */ -(function(root, factory) { - - /* CommonJS */ - if (typeof exports == 'object') module.exports = factory() - - /* AMD module */ - else if (typeof define == 'function' && define.amd) define(factory) - - /* Browser global */ - else root.Spinner = factory() -} -(this, function() { - "use strict"; - - var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */ - , animations = {} /* Animation rules keyed by their name */ - , useCssAnimations /* Whether to use CSS animations or setTimeout */ - - /** - * Utility function to create elements. If no tag name is given, - * a DIV is created. Optionally properties can be passed. - */ - function createEl(tag, prop) { - var el = document.createElement(tag || 'div') - , n - - for(n in prop) el[n] = prop[n] - return el - } - - /** - * Appends children and returns the parent. - */ - function ins(parent /* child1, child2, ...*/) { - for (var i=1, n=arguments.length; i>1) + 'px' - }) - } - - for (; i < o.lines; i++) { - seg = css(createEl(), { - position: 'absolute', - top: 1+~(o.width/2) + 'px', - transform: o.hwaccel ? 'translate3d(0,0,0)' : '', - opacity: o.opacity, - animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1/o.speed + 's linear infinite' - }) - - if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'})) - ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)'))) - } - return el - }, - - /** - * Internal method that adjusts the opacity of a single line. - * Will be overwritten in VML fallback mode below. - */ - opacity: function(el, i, val) { - if (i < el.childNodes.length) el.childNodes[i].style.opacity = val - } - - }) - - - function initVML() { - - /* Utility function to create a VML tag */ - function vml(tag, attr) { - return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr) - } - - // No CSS transforms but VML support, add a CSS rule for VML elements: - sheet.addRule('.spin-vml', 'behavior:url(#default#VML)') - - Spinner.prototype.lines = function(el, o) { - var r = o.length+o.width - , s = 2*r - - function grp() { - return css( - vml('group', { - coordsize: s + ' ' + s, - coordorigin: -r + ' ' + -r - }), - { width: s, height: s } - ) - } - - var margin = -(o.width+o.length)*2 + 'px' - , g = css(grp(), {position: 'absolute', top: margin, left: margin}) - , i - - function seg(i, dx, filter) { - ins(g, - ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}), - ins(css(vml('roundrect', {arcsize: o.corners}), { - width: r, - height: o.width, - left: o.radius, - top: -o.width>>1, - filter: filter - }), - vml('fill', {color: getColor(o.color, i), opacity: o.opacity}), - vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change - ) - ) - ) - } - - if (o.shadow) - for (i = 1; i <= o.lines; i++) - seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)') - - for (i = 1; i <= o.lines; i++) seg(i) - return ins(el, g) - } - - Spinner.prototype.opacity = function(el, i, val, o) { - var c = el.firstChild - o = o.shadow && o.lines || 0 - if (c && i+o < c.childNodes.length) { - c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild - if (c) c.opacity = val - } - } - } - - var probe = css(createEl('group'), {behavior: 'url(#default#VML)'}) - - if (!vendor(probe, 'transform') && probe.adj) initVML() - else useCssAnimations = vendor(probe, 'animation') - - return Spinner - -})); diff --git a/app/manifest.json b/app/manifest.json index 293b133..b132046 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_appName__", - "version": "0.8.0", + "version": "0.8.1", "manifest_version": 2, "description": "__MSG_appDescription__", "icons": { @@ -28,13 +28,13 @@ "*://*.feedly.com/*" ], "js": [ - "libs/spinjs/spin.js", - "libs/iosOverlay/iosOverlay.js", + "bower_components/spin.js/spin.js", + "bower_components/iosoverlay/js/iosOverlay.js", "bower_components/mousetrap/mousetrap.js", "scripts/content.js" ], "css": [ - "libs/iosOverlay/iosOverlay.css", + "bower_components/iosoverlay/css/iosOverlay.css", "styles/content.css" ] } diff --git a/app/scripts/options.js b/app/scripts/options.js index 47d6563..562375a 100644 --- a/app/scripts/options.js +++ b/app/scripts/options.js @@ -76,7 +76,9 @@ function translateOptions() { for(i = 0; i < objects.length; i++) { if (objects[i].dataset && objects[i].dataset.message) { var html = chrome.i18n.getMessage(objects[i].dataset.message); - if (html) objects[i].innerHTML = chrome.i18n.getMessage(objects[i].dataset.message); + if (html) { + objects[i].innerHTML = chrome.i18n.getMessage(objects[i].dataset.message); + } } } } diff --git a/bower.json b/bower.json index 1e95825..1617741 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,9 @@ "version": "0.0.0", "dependencies": { "bootstrap": "~3.2.0", - "mousetrap": "~1.5.2" + "mousetrap": "~1.5.2", + "spin.js": "spinjs#^2.3.2", + "iosoverlay": "iOS-Overlay#0.0.1" }, "devDependencies": {} } diff --git a/package.json b/package.json index 5b92f61..0871ab0 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,28 @@ { "name": "fullyfeedly", "version": "0.0.0", - "dependencies": { - }, + "dependencies": {}, "devDependencies": { "grunt": "~1.0.1", "grunt-bower-install": "~1.6.0", "grunt-chrome-manifest": "~0.3.0", - "grunt-concurrent": "~2.3.0", + "grunt-concurrent": "~2.3.1", "grunt-contrib-clean": "~1.0.0", "grunt-contrib-compress": "~1.3.0", "grunt-contrib-concat": "^1.0.1", "grunt-contrib-connect": "~1.0.2", "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-cssmin": "~1.0.1", + "grunt-contrib-cssmin": "~1.0.2", "grunt-contrib-htmlmin": "~2.0.0", "grunt-contrib-imagemin": "~1.0.1", "grunt-contrib-jshint": "~1.0.0", "grunt-contrib-uglify": "~2.0.0", "grunt-contrib-watch": "~1.0.0", "grunt-mocha": "~1.0.2", - "grunt-svgmin": "~3.3.0", + "grunt-svgmin": "~4.0.0", "grunt-usemin": "~3.1.1", - "jshint-stylish": "~2.2.0", - "load-grunt-tasks": "~3.5.0", + "jshint-stylish": "~2.2.1", + "load-grunt-tasks": "~3.5.2", "time-grunt": "~1.4.0" }, "engines": {