Commit 719371f9 authored by Madhur's avatar Madhur

master updated:

parent 9151b787
_site/
.sass-cache/
.DS_STORE
\ No newline at end of file
.DS_STORE
node_modules
jshint.logs
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
span.emoji {
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
*vertical-align: auto;
*zoom: 1;
*display: inline;
width: 1em;
height: 1em;
background-size: 1em;
background-repeat: no-repeat;
text-indent: -9999px;
}
span.emoji-sizer {
line-height: 0.81em;
font-size: 1em;
margin: -2px 0;
}
span.emoji-outer {
display: -moz-inline-box;
display: inline-block;
*display: inline;
height: 1em;
width: 1em;
}
span.emoji-inner {
display: -moz-inline-box;
display: inline-block;
text-indent: -9999px;
width: 100%;
height: 100%;
vertical-align: baseline;
*vertical-align: auto;
*zoom: 1;
}
img.emoji {
width: 1em;
height: 1em;
}
.emoji-wysiwyg-editor:empty:before {
content: attr(placeholder);
color: #9aa2ab;
}
.icon-emoji {
display: inline-block;
width: 23px;
height: 23px;
vertical-align: text-top;
background: url('../img/IconsetW.png') -10px -4px/42px 1171px no-repeat;
opacity: 0.8;
}
.im_emoji_btn:hover .icon-emoji {
opacity: 1;
}
/* Emoji area */
.emoji-wysiwyg-editor:empty:before {
content: attr(placeholder);
color: #9aa2ab;
}
.emoji-wysiwyg-editor:active:before,
.emoji-wysiwyg-editor:focus:before {
content: none;
}
.emoji-wysiwyg-editor {
padding:6px;
-moz-box-sizing: content-box;
font-size: 12px;
margin-bottom: 10px;
min-height: 36px;
height: 30px;
max-height: 284px;
overflow: auto;
line-height: 17px;
border: 1px solid #d2dbe3;
border-radius: 2px;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
-webkit-user-select: text;
word-wrap: break-word;
}
.emoji-wysiwyg-editor img {
width: 20px;
height: 20px;
vertical-align: middle;
margin: -3px 0 0 0;
}
.emoji-menu {
position: absolute;
z-index: 999;
width: 225px;
margin-left: -107px;
margin-top: -252px;
overflow: hidden;
border: 1px #dfdfdf solid;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
overflow: hidden;
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
}
.emoji-items-wrap1 {
background: #FFF;
padding: 5px 2px 5px 5px;
}
.emoji-items-wrap1 .emoji-menu-tabs {
width: 100%;
margin-bottom: 8px;
margin-top: 3px;
}
.emoji-items-wrap1 .emoji-menu-tabs td {
text-align: center;
color: white;
line-height: 0;
}
.emoji-menu-tabs .emoji-menu-tab {
display: inline-block;
width: 24px;
height: 29px;
background: url('../img/IconsetSmiles.png') no-repeat;
background-size: 42px 350px;
}
.is_1x .emoji-menu-tabs .emoji-menu-tab {
background-image: url('../img/IconsetSmiles_1x.png');
}
.emoji-menu-tabs .icon-recent {background-position: -9px -306px; }
.emoji-menu-tabs .icon-recent-selected {background-position: -9px -277px; }
.emoji-menu-tabs .icon-smile {background-position: -9px -34px; }
.emoji-menu-tabs .icon-smile-selected {background-position: -9px -5px; }
.emoji-menu-tabs .icon-flower {background-position: -9px -145px; }
.emoji-menu-tabs .icon-flower-selected {background-position: -9px -118px; }
.emoji-menu-tabs .icon-bell {background-position: -9px -89px; }
.emoji-menu-tabs .icon-bell-selected {background-position: -9px -61px; }
.emoji-menu-tabs .icon-car {background-position: -9px -196px; }
.emoji-menu-tabs .icon-car-selected {background-position: -9px -170px; }
.emoji-menu-tabs .icon-grid {background-position: -9px -248px; }
.emoji-menu-tabs .icon-grid-selected {background-position: -9px -222px; }
.emoji-menu-tabs .icon-smile,
.emoji-menu-tabs .icon-flower,
.emoji-menu-tabs .icon-bell,
.emoji-menu-tabs .icon-car,
.emoji-menu-tabs .icon-grid {
opacity: 0.7;
}
.emoji-menu-tabs .icon-smile:hover,
.emoji-menu-tabs .icon-flower:hover,
.emoji-menu-tabs .icon-bell:hover,
.emoji-menu-tabs .icon-car:hover,
.emoji-menu-tabs .icon-grid:hover {
opacity: 1;
}
.emoji-menu .emoji-items-wrap {
position: relative;
height: 174px;
}
.emoji-menu .emoji-items {
padding-right: 8px;
outline: 0 !important;
}
.emoji-menu img {
width: 20px;
height: 20px;
vertical-align: middle;
border: 0 none;
}
.emoji-menu .emoji-items a {
margin: -1px 0 0 -1px;
padding: 5px;
display: block;
float: left;
border-radius: 2px;
}
.emoji-menu .emoji-items a:hover {
background-color: #edf2f5;
}
.emoji-menu:after {
content: ' ';
display: block;
clear: left;
}
.emoji-menu a .label {
display: none;
}
/** initial setup **/
.nano {
position : relative;
width : 100%;
height : 100%;
overflow : hidden;
}
.nano > .nano-content {
position : absolute;
overflow : scroll;
overflow-x : hidden;
top : 0;
right : 0;
bottom : 0;
left : 0;
}
.nano > .nano-content:focus {
outline: thin dotted;
}
.nano > .nano-content::-webkit-scrollbar {
display: none;
}
.has-scrollbar > .nano-content::-webkit-scrollbar {
display: block;
}
.nano > .nano-pane {
background : rgba(0,0,0,.25);
position : absolute;
width : 10px;
right : 0;
top : 0;
bottom : 0;
visibility : hidden\9; /* Target only IE7 and IE8 with this hack */
opacity : .01;
-webkit-transition : .2s;
-moz-transition : .2s;
-o-transition : .2s;
transition : .2s;
-moz-border-radius : 5px;
-webkit-border-radius : 5px;
border-radius : 5px;
}
.nano > .nano-pane > .nano-slider {
background: #444;
background: rgba(0,0,0,.5);
position : relative;
margin : 0 1px;
-moz-border-radius : 3px;
-webkit-border-radius : 3px;
border-radius : 3px;
}
.nano:hover > .nano-pane, .nano-pane.active, .nano-pane.flashed {
visibility : visible\9; /* Target only IE7 and IE8 with this hack */
opacity : 0.99;
}
body
{
background: #222222 url("../img/black_linen_v2.png") repeat;
color: #aaaaaa;
}
h1
{
color:white;
}
.form-control:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}
.emojiForm
{
top: 50%;
width:100%;
}
.form-control,pre
{
background-color:black;
color:white;
}
ul li, .radio
{
display:inline;
}
ul {
padding: 0;
list-style-type: none;
}
pre
{
background-color: #555555;
margin-top:20px;
border:none;
}
.emoji-wysiwyg-editor, .userinput
{
background-color: white;
color:black;
overflow:auto;
}
.emoji-wysiwyg-editor
{
height: 52px;
}
\ No newline at end of file
/*! Angular Emoji Popup 1.0.0 2014-12-26 */
.nano{position:relative;width:100%;height:100%;overflow:hidden}.nano>.nano-content{position:absolute;overflow:scroll;overflow-x:hidden;top:0;right:0;bottom:0;left:0}.nano>.nano-content:focus{outline:dotted thin}.nano>.nano-content::-webkit-scrollbar{display:none}.has-scrollbar>.nano-content::-webkit-scrollbar{display:block}.nano>.nano-pane{background:rgba(0,0,0,.25);position:absolute;width:10px;right:0;top:0;bottom:0;opacity:.01;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.nano>.nano-pane>.nano-slider{background:#444;background:rgba(0,0,0,.5);position:relative;margin:0 1px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.nano-pane.active,.nano-pane.flashed,.nano:hover>.nano-pane{opacity:.99}body{background:url(../img/black_linen_v2.png) #222;color:#aaa}h1{color:#fff}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.emojiForm{top:50%;width:100%}.form-control,pre{background-color:#000;color:#fff}.radio,ul li{display:inline}ul{padding:0;list-style-type:none}pre{background-color:#555;margin-top:20px;border:none}.emoji-wysiwyg-editor,.userinput{background-color:#fff;color:#000;overflow:auto}.emoji-wysiwyg-editor{height:52px}
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html ng-app="emojiApp">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>AngularJs Emoji Popup Demo</title>
<link type="text/stylesheet" rel="stylesheet" href="css/bootstrap.min.css" />
<link type="text/stylesheet" rel="stylesheet" href="css/bootstrap-theme.min.css" />
<link type="text/stylesheet" rel="stylesheet" href="css/nanoscroller.css" />
<link type="text/stylesheet" rel="stylesheet" href="css/emoji.css" />
<link type="text/stylesheet" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/lib/jquery.min.js"></script>
</head>
<a href="https://github.com/madhur/angular-emoji-popup"><img style="position: absolute; top: 0; right: 30px; border: 0;" src="img/gh-ribbon.png" alt="Fork me on GitHub">
</a>
<body ng-controller="emojiController">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 style="text-align:center">AngularJs Emoji Popup Demo</h1>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h2>Encoding</h2>
<h1 class="visible-md visible-lg">&nbsp;</h1>
<div class="myform form-group">
<div emoji-form emoji-message="emojiMessage">
<textarea class="form-control" id="messageInput" ng-model="emojiMessage.messagetext" placeholder="Write a message..."></textarea>
<button class="btn btn-default im_emoji_btn pull-right visible-md visible-lg" id="emojibtn">
<i class="icon icon-emoji"></i>
</button>
<button class="btn btn-default im_emoji_btn visible-sm visible-xs" id="emojibtn">
<i class="icon icon-emoji"></i>
</button>
</div>
<div class="clearfix"></div>
<pre>&lt;div emoji-form emoji-message="emojiMessage"&gt;
&lt;textarea id="messageInput" ng-model="emojiMessage.messagetext" /&gt;&lt;/textarea&gt;
&lt;button id="emojibtn"&gt;
&lt;i class="icon icon-emoji"&gt;&lt;/i&gt;
&lt;/button&gt;
&lt;/div&gt;</pre>
<h4>Raw: </h4>
<div class="form-control" style="height:200px; overflow:auto" ng-bind="emojiMessage.rawhtml"></div>
<pre>
&lt;div ng-bind="emojiMessage.rawhtml"&gt;&lt;/div&gt;</pre>
<h4>Colons: </h4>
<div class="form-control" style="height:50px;overflow:auto" ng-bind="emojiMessage.messagetext"></div>
<pre>
&lt;div ng-bind="emojiMessage.messagetext"&gt;&lt;/div&gt;</pre>
<h4>Parsed: </h4>
<div class="form-control" style="height:50px;overflow:auto" ng-bind-html="emojiMessage.rawhtml"></div>
<pre>
&lt;div ng-bind-html="emojiMessage.messagetext"&gt;&lt;/div&gt;</pre>
<h4>Unicode: (Some emoji might be unreadable) </h4>
<div class="form-control" style="height:50px;overflow:auto" ng-bind="emojiMessage.messagetext | colonToCode"> </div>
<pre>
&lt;div ng-bind="emojiMessage.messagetext | colonToCode "&gt;&lt;/div&gt;</pre>
</div>
</div>
<div class="col-md-6">
<h2>Decoding</h2>
<h1 class="visible-md visible-lg">&nbsp;</h1>
<div class="form-group">
<textarea class="form-control userinput" id="messageInput" ng-model="emojiMessage.encodedtext" placeholder="Enter encoded text..."></textarea>
<pre style="margin-top:65px">&lt;textarea id="messageInput" ng-model="emojiMessage.encodedtext"&gt;&lt;/textarea&gt;</pre>
<h4>Decode mode</h4>
<ul>
<li class="radio">
<label>
<input type="radio" ng-model="decodeType" value="colon" name="optradio">Colon</label>
</li>
<li class="radio">
<label>
<input type="radio" ng-model="decodeType" value="unicode" name="optradio">Unicode</label>
</li>
<li class="radio">
<label>
<input type="radio" ng-model="decodeType" value="html" name="optradio">HTML</label>
</li>
</ul>
<h1 class="visible-md visible-lg">&nbsp;</h1>
<h4>Decoded message: </h4>
<div class="form-control" style="height:50px;overflow:auto" ng-show="decodeType=='colon'" ng-bind-html="emojiMessage.encodedtext | colonToSmiley"></div>
<pre ng-show="decodeType=='colon'">&lt;div ng-bind-html="emojiMessage.encodedtext | colonToSmiley"&gt;&lt;/div&gt;</pre>
<div class="form-control" style="height:50px;overflow:auto" ng-show="decodeType=='unicode'" ng-bind-html="emojiMessage.encodedtext | codeToSmiley"></div>
<pre ng-show="decodeType=='unicode'">&lt;div ng-bind-html="emojiMessage.encodedtext | codeToSmiley"&gt;&lt;/div&gt;</pre>
<div class="form-control" style="height:50px;overflow:auto" ng-show="decodeType=='html'" ng-bind-html="emojiMessage.encodedtext"></div>
<pre ng-show="decodeType=='html'">&lt;div ng-bind-html="emojiMessage.encodedtext"&gt;&lt;/div&gt;</pre>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="js/lib/angular.min.js"></script>
<script type="text/javascript" src="js/lib/angular-sanitize.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/jquery.emojiarea.js"></script>
<script type="text/javascript" src="js/emojiController.js"></script>
<script type="text/javascript" src="js/emojiDirectives.js"></script>
<script type="text/javascript" src="js/emojiFilters.js"></script>
<script type="text/javascript" src="js/nanoscroller.js"></script>
</body>
</html>
'use strict';
var emojiApp = angular.module("emojiApp", ['ngSanitize']);
emojiApp.config(function($sceProvider)
{
$sceProvider.enabled(false);
var icons = {},
reverseIcons = {},
i, j, hex, name, dataItem, row, column, totalColumns;
for (j = 0; j < Config.EmojiCategories.length; j++)
{
totalColumns = Config.EmojiCategorySpritesheetDimens[j][1];
for (i = 0; i < Config.EmojiCategories[j].length; i++)
{
dataItem = Config.Emoji[Config.EmojiCategories[j][i]];
name = dataItem[1][0];
row = Math.floor(i / totalColumns);
column = (i % totalColumns);
icons[':' + name + ':'] = [j, row, column,
':' + name + ':'
];
reverseIcons[name] = dataItem[0];
}
}
$.emojiarea.spritesheetPath = 'img/emojisprite_!.png';
$.emojiarea.spritesheetDimens = Config.EmojiCategorySpritesheetDimens;
$.emojiarea.iconSize = 20;
$.emojiarea.icons = icons;
$.emojiarea.reverseIcons = reverseIcons;
});
emojiApp.directive('contenteditable', [ '$sce', function($sce) {
return {
restrict : 'A', // only activate on element attribute
require : '?ngModel', // get a hold of NgModelController
link : function(scope, element, attrs, ngModel) {
if (!ngModel)
return; // do nothing if no ng-model
// Specify how UI should be updated
ngModel.$render = function() {
element.html(ngModel.$viewValue || '');
};
// Listen for change events to enable binding
element.on('blur keyup change', function() {
scope.$evalAsync(read);
});
read(); // initialize
// Write data to the model
function read() {
var html = element.html();
// When we clear the content editable the browser leaves a <br>
// behind
// If strip-br attribute is provided then we strip this out
if (attrs.stripBr && html == '<br>') {
html = '';
}
ngModel.$setViewValue(html);
}
}
};
} ]);
This source diff could not be displayed because it is too large. You can view the blob instead.
'use strict';
emojiApp.controller('emojiController', ['$scope', '$log', function($scope, $log) {
$scope.emojiMessage={};
$scope.decodeType='colon';
$scope.emojiMessage.replyToUser = function()
{
alert('You typed ' + $scope.emojiMessage.messagetext);
}
}]);
'use strict';
emojiApp.directive('emojiForm', ['$timeout', '$http', '$interpolate','$compile', function($timeout, $http, $interpolate, $compile)
{
return {
scope:
{
emojiMessage: '='
},
link: link
};
function link($scope, element, attrs)
{
var messageField = $('textarea', element)[0],
fileSelects = $('input', element),
emojiButton = $('#emojibtn', element)[0],
editorElement = messageField,
emojiArea = $(messageField).emojiarea(
{
button: emojiButton,
norealTime: true
}),
emojiMenu = $('.emoji-menu', element)[0],
richTextarea = $(
'.emoji-wysiwyg-editor', element)[0];
var s = $compile($("#messageDiv"));
$("#messageDiv").replaceWith(s($scope));
if (richTextarea)
{
editorElement = richTextarea;
$(richTextarea).addClass('form-control');
$(richTextarea)
.attr(
'placeholder',
$interpolate(
$(messageField).attr(
'placeholder'))(
$scope));
var updatePromise;
$(richTextarea)
.on('DOMNodeInserted', onPastedImageEvent)
.on(
'keyup',
function(e)
{
updateHeight();
if (!sendAwaiting)
{
$scope
.$apply(function()
{
$scope.emojiMessage.messagetext = richTextarea.textContent;
});
}
$timeout.cancel(updatePromise);
updatePromise = $timeout(
updateValue, 1000);
});
}
var sendOnEnter = true;
$(editorElement).on(
'keydown',
function(e)
{
if (richTextarea)
{
updateHeight();
}
if (e.keyCode == 13)
{
var submit = false;
if (sendOnEnter && !e.shiftKey)
{
submit = true;
}
else if (!sendOnEnter && (e.ctrlKey || e.metaKey))
{
submit = true;
}
if (submit)
{
$timeout.cancel(updatePromise);
updateValue();
$scope.emojiMessage.replyToUser();
// $(element).trigger('message_send');
resetTyping();
return cancelEvent(e);
}
}
});
// $(submitBtn).on('mousedown touchstart', function(e)
// {
// $timeout.cancel(updatePromise);
// updateValue();
// $scope.draftMessage.replyToUser();
// resetTyping();
// return cancelEvent(e);
// });
function resetTyping()
{
// lastTyping = 0;
// lastLength = 0;
};
function updateRichTextarea()
{
console.log("updateRichTextarea");
if (richTextarea)
{
$timeout.cancel(updatePromise);
var html = $('<div>').text(
$scope.draftMessage.text || '').html();
html = html.replace(/\n/g, '<br/>');
$(richTextarea).html(html);
lastLength = html.length;
updateHeight();
}
}
function updateValue()
{
if (richTextarea)
{
$(richTextarea).trigger('change');
updateHeight();
}
}
var height = richTextarea.offsetHeight;
function updateHeight()
{
var newHeight = richTextarea.offsetHeight;
if (height != newHeight)
{
height = newHeight;
$scope.$emit('ui_editor_resize');
}
};
function onPastedImageEvent(e)
{
var element = (e.originalEvent || e).target,
src = (element ||
{}).src || '',
remove = false;
if (src.substr(0, 5) == 'data:')
{
remove = true;
var blob = dataUrlToBlob(src);
ErrorService.confirm(
{
type: 'FILE_CLIPBOARD_PASTE'
}).then(function()
{
$scope.draftMessage.files = [blob];
$scope.draftMessage.isMedia = true;
});
setZeroTimeout(function()
{
element.parentNode.removeChild(element);
})
}
else if (src && !src.match(/img\/blank\.gif/))
{
var replacementNode = document.createTextNode(' ' + src + ' ');
setTimeout(function()
{
element.parentNode.replaceChild(replacementNode, element);
}, 100);
}
};
function onPasteEvent(e)
{
console.log("onPasteEvent");
var cData = (e.originalEvent || e).clipboardData,
items = cData && cData.items || [],
files = [],
file, i;
for (i = 0; i < items.length; i++)
{
if (items[i].kind == 'file')
{
file = items[i].getAsFile();
files.push(file);
}
}
if (files.length > 0)
{
ErrorService.confirm(
{
type: 'FILES_CLIPBOARD_PASTE',
files: files
}).then(function()
{
$scope.draftMessage.files = files;
$scope.draftMessage.isMedia = true;
});
}
}
function onKeyDown(e)
{
if (e.keyCode == 9 && !e.shiftKey && !e.ctrlKey && !e.metaKey && !$modalStack.getTop())
{ // TAB
editorElement.focus();
return cancelEvent(e);
}
}
$(document).on('keydown', onKeyDown);
$(document).on('paste', onPasteEvent);
var sendAwaiting = false;
function focusField()
{
onContentLoaded(function()
{
editorElement.focus();
});
}
$scope.$on('$destroy', function cleanup()
{
$(document).off('paste', onPasteEvent);
$(document).off('keydown', onKeyDown);
$(submitBtn).off('mousedown')
fileSelects.off('change');
if (richTextarea)
{
$(richTextarea).off('DOMNodeInserted keyup',
onPastedImageEvent);
}
$(editorElement).off('keydown');
});
}
}]);
'use strict';
emojiApp.filter('colonToCode', function() {
return function(input) {
if(!input)
return "";
if(!Config.rx_colons)
Config.init_unified();
return input.replace(Config.rx_colons, function(m)
{
var val = Config.mapcolon[m];
if (val)
{
return val;
}
else
return "";
});
};
});
emojiApp.filter('codeToSmiley', function() {
return function(input) {
if(!input)
return "";
if(!Config.rx_codes)
Config.init_unified();
return input.replace(Config.rx_codes, function(m)
{
var val = Config.reversemap[m];
if (val) {
val = ":" + val + ":";
var $img = $.emojiarea.createIcon($.emojiarea.icons[val]);
return $img;
}
else
return "";
});
};
});
emojiApp.filter('colonToSmiley', function() {
return function(input) {
if(!input)
return "";
if(!Config.rx_colons)
Config.init_unified();
return input.replace(Config.rx_colons, function(m)
{
if (m)
{
var $img = $.emojiarea.createIcon($.emojiarea.icons[m]);
return $img;
}
else
return "";
});
};
});
\ No newline at end of file
This diff is collapsed.
/*
AngularJS v1.3.7
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function(n,h,p){'use strict';function E(a){var d=[];s(d,h.noop).chars(a);return d.join("")}function g(a){var d={};a=a.split(",");var c;for(c=0;c<a.length;c++)d[a[c]]=!0;return d}function F(a,d){function c(a,b,c,l){b=h.lowercase(b);if(t[b])for(;f.last()&&u[f.last()];)e("",f.last());v[b]&&f.last()==b&&e("",b);(l=w[b]||!!l)||f.push(b);var m={};c.replace(G,function(a,b,d,c,e){m[b]=r(d||c||e||"")});d.start&&d.start(b,m,l)}function e(a,b){var c=0,e;if(b=h.lowercase(b))for(c=f.length-1;0<=c&&f[c]!=b;c--);
if(0<=c){for(e=f.length-1;e>=c;e--)d.end&&d.end(f[e]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,f=[],m=a,l;for(f.last=function(){return f[f.length-1]};a;){l="";k=!0;if(f.last()&&x[f.last()])a=a.replace(new RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");d.chars&&d.chars(r(b));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(d.comment&&d.comment(a.substring(4,
b)),a=a.substring(b+3),k=!1);else if(y.test(a)){if(b=a.match(y))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,e),k=!1}else K.test(a)&&((b=a.match(A))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(A,c)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),d.chars&&d.chars(r(l)))}if(a==m)throw L("badparse",a);m=a}e()}function r(a){if(!a)return"";var d=M.exec(a);a=d[1];var c=d[3];if(d=d[2])q.innerHTML=
d.replace(/</g,"&lt;"),d="textContent"in q?q.textContent:q.innerText;return a+d+c}function B(a){return a.replace(/&/g,"&amp;").replace(N,function(a){var c=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(c-55296)+(a-56320)+65536)+";"}).replace(O,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s(a,d){var c=!1,e=h.bind(a,a.push);return{start:function(a,k,f){a=h.lowercase(a);!c&&x[a]&&(c=a);c||!0!==C[a]||(e("<"),e(a),h.forEach(k,function(c,f){var k=
h.lowercase(f),g="img"===a&&"src"===k||"background"===k;!0!==P[k]||!0===D[k]&&!d(c,g)||(e(" "),e(f),e('="'),e(B(c)),e('"'))}),e(f?"/>":">"))},end:function(a){a=h.lowercase(a);c||!0!==C[a]||(e("</"),e(a),e(">"));a==c&&(c=!1)},chars:function(a){c||e(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,z=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,
J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,y=/<!DOCTYPE([^>]*?)>/i,I=/<!\[CDATA\[(.*?)]]\x3e/g,N=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,O=/([^\#-~| |!])/g,w=g("area,br,col,hr,img,wbr");n=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");p=g("rp,rt");var v=h.extend({},p,n),t=h.extend({},n,g("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),u=h.extend({},p,g("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
n=g("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use");var x=g("script,style"),C=h.extend({},w,t,u,v,n),D=g("background,cite,href,longdesc,src,usemap,xlink:href");n=g("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width");
p=g("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan");
var P=h.extend({},D,p,n),q=document.createElement("pre"),M=/^(\s*)([\s\S]*?)(\s*)$/;h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(d){var c=[];F(d,s(c,function(c,b){return!/^unsafe/.test(a(c,b))}));return c.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var d=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/,c=/^mailto:/;return function(e,b){function k(a){a&&g.push(E(a))}
function f(a,c){g.push("<a ");h.isDefined(b)&&g.push('target="',b,'" ');g.push('href="',a.replace(/"/g,"&quot;"),'">');k(c);g.push("</a>")}if(!e)return e;for(var m,l=e,g=[],n,p;m=l.match(d);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),f(n,m[0].replace(c,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
//# sourceMappingURL=angular-sanitize.min.js.map
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
'use strict';
function checkDragEvent(e) {
if (!e || e.target && (e.target.tagName == 'IMG' || e.target.tagName == 'A')) return false;
if (e.dataTransfer && e.dataTransfer.types) {
for (var i = 0; i < e.dataTransfer.types.length; i++) {
if (e.dataTransfer.types[i] == 'Files') {
return true;
}
}
} else {
return true;
}
return false;
}
function cancelEvent (event) {
event = event || window.event;
if (event) {
event = event.originalEvent || event;
if (event.stopPropagation) event.stopPropagation();
if (event.preventDefault) event.preventDefault();
}
return false;
}
//ConfigStorage
(function(window)
{
var keyPrefix = '';
var noPrefix = false;
var cache = {};
var useCs = !!(window.chrome && chrome.storage && chrome.storage.local);
var useLs = !useCs && !!window.localStorage;
function storageSetPrefix(newPrefix)
{
keyPrefix = newPrefix;
}
function storageSetNoPrefix()
{
noPrefix = true;
}
function storageGetPrefix()
{
if (noPrefix)
{
noPrefix = false;
return '';
}
return keyPrefix;
}
function storageGetValue()
{
var keys = Array.prototype.slice.call(arguments),
callback = keys.pop(),
result = [],
single = keys.length == 1,
value,
allFound = true,
prefix = storageGetPrefix(),
i, key;
for (i = 0; i < keys.length; i++)
{
key = keys[i] = prefix + keys[i];
if (key.substr(0, 3) != 'xt_' && cache[key] !== undefined)
{
result.push(cache[key]);
}
else if (useLs)
{
try
{
value = localStorage.getItem(key);
}
catch (e)
{
useLs = false;
}
try
{
value = (value === undefined || value === null) ? false : JSON.parse(value);
}
catch (e)
{
value = false;
}
result.push(cache[key] = value);
}
else if (!useCs)
{
result.push(cache[key] = false);
}
else
{
allFound = false;
}
}
if (allFound)
{
return callback(single ? result[0] : result);
}
chrome.storage.local.get(keys, function(resultObj)
{
var value;
result = [];
for (i = 0; i < keys.length; i++)
{
key = keys[i];
value = resultObj[key];
value = value === undefined || value === null ? false : JSON.parse(value);
result.push(cache[key] = value);
}
callback(single ? result[0] : result);
});
};
function storageSetValue(obj, callback)
{
var keyValues = {},
prefix = storageGetPrefix(),
key, value;
for (key in obj)
{
if (obj.hasOwnProperty(key))
{
value = obj[key];
key = prefix + key;
cache[key] = value;
value = JSON.stringify(value);
if (useLs)
{
try
{
localStorage.setItem(key, value);
}
catch (e)
{
useLs = false;
}
}
else
{
keyValues[key] = value;
}
}
}
if (useLs || !useCs)
{
if (callback)
{
callback();
}
return;
}
chrome.storage.local.set(keyValues, callback);
};
function storageRemoveValue()
{
var keys = Array.prototype.slice.call(arguments),
prefix = storageGetPrefix(),
i, key, callback;
if (typeof keys[keys.length - 1] === 'function')
{
callback = keys.pop();
}
for (i = 0; i < keys.length; i++)
{
key = keys[i] = prefix + keys[i];
delete cache[key];
if (useLs)
{
try
{
localStorage.removeItem(key);
}
catch (e)
{
useLs = false;
}
}
}
if (useCs)
{
chrome.storage.local.remove(keys, callback);
}
else if (callback)
{
callback();
}
};
window.ConfigStorage = {
prefix: storageSetPrefix,
noPrefix: storageSetNoPrefix,
get: storageGetValue,
set: storageSetValue,
remove: storageRemoveValue
};
})(this);
This diff is collapsed.
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