mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
Revert some bower assets
This commit is contained in:
parent
8f9afa42d5
commit
a258897884
9 changed files with 8 additions and 278 deletions
|
@ -34,6 +34,7 @@
|
|||
"imgur": "git+https://github.com/hackmdio/node-imgur.git",
|
||||
"jquery": "^3.1.1",
|
||||
"jquery-mousewheel": "^3.1.13",
|
||||
"jquery-scrollspy": "github:softwarespot/jquery-scrollspy",
|
||||
"jquery-textcomplete": "^1.7.3",
|
||||
"jquery-ui": "^1.12.1",
|
||||
"js-cookie": "^2.1.3",
|
||||
|
|
|
@ -8,7 +8,7 @@ require('jquery-ui/ui/widgets/autocomplete');
|
|||
require('jquery');
|
||||
require('jquery-textcomplete');
|
||||
require('jquery-mousewheel');
|
||||
require('../vendor/jquery-scrollspy');
|
||||
require('jquery-scrollspy/jquery-scrollspy');
|
||||
require('../vendor/showup/showup');
|
||||
|
||||
/* bootstrap */
|
||||
|
|
|
@ -8,7 +8,7 @@ require('jquery-ui/ui/widgets/autocomplete');
|
|||
require('jquery');
|
||||
require('jquery-textcomplete');
|
||||
require('jquery-mousewheel');
|
||||
require('../vendor/jquery-scrollspy');
|
||||
require('jquery-scrollspy/jquery-scrollspy');
|
||||
require('../vendor/showup/showup');
|
||||
|
||||
/* bootstrap */
|
||||
|
|
2
public/vendor/idle.min.js
vendored
2
public/vendor/idle.min.js
vendored
|
@ -1,2 +0,0 @@
|
|||
/*! Idle.Js, copyright 2015-01-01, Shawn Mclean*/
|
||||
(function(){var a;document.addEventListener||(document.addEventListener=document.attachEvent?function(a,b,c){return document.attachEvent("on"+a,b,c)}:function(){return{}}),document.removeEventListener||(document.removeEventListener=document.detachEvent?function(a,b){return document.detachEvent("on"+a,b)}:function(){return{}}),a={},a=function(){function a(a){var b,c;a&&(this.awayTimeout=parseInt(a.awayTimeout,10),this.onAway=a.onAway,this.onAwayBack=a.onAwayBack,this.onVisible=a.onVisible,this.onHidden=a.onHidden),c=this,b=function(){return c.onActive()},window.onclick=b,window.onmousemove=b,window.onmouseenter=b,window.onkeydown=b,window.onscroll=b,window.onmousewheel=b}return a.isAway=!1,a.awayTimeout=3e3,a.awayTimestamp=0,a.awayTimer=null,a.onAway=null,a.onAwayBack=null,a.onVisible=null,a.onHidden=null,a.prototype.onActive=function(){return this.awayTimestamp=(new Date).getTime()+this.awayTimeout,this.isAway&&(this.onAwayBack&&this.onAwayBack(),this.start()),this.isAway=!1,!0},a.prototype.start=function(){var a;return this.listener||(this.listener=function(){return a.handleVisibilityChange()},document.addEventListener("visibilitychange",this.listener,!1),document.addEventListener("webkitvisibilitychange",this.listener,!1),document.addEventListener("msvisibilitychange",this.listener,!1)),this.awayTimestamp=(new Date).getTime()+this.awayTimeout,null!==this.awayTimer&&clearTimeout(this.awayTimer),a=this,this.awayTimer=setTimeout(function(){return a.checkAway()},this.awayTimeout+100),this},a.prototype.stop=function(){return null!==this.awayTimer&&clearTimeout(this.awayTimer),null!==this.listener&&(document.removeEventListener("visibilitychange",this.listener),document.removeEventListener("webkitvisibilitychange",this.listener),document.removeEventListener("msvisibilitychange",this.listener),this.listener=null),this},a.prototype.setAwayTimeout=function(a){return this.awayTimeout=parseInt(a,10),this},a.prototype.checkAway=function(){var a,b;return b=(new Date).getTime(),b<this.awayTimestamp?(this.isAway=!1,a=this,void(this.awayTimer=setTimeout(function(){return a.checkAway()},this.awayTimestamp-b+100))):(null!==this.awayTimer&&clearTimeout(this.awayTimer),this.isAway=!0,this.onAway?this.onAway():void 0)},a.prototype.handleVisibilityChange=function(){if(document.hidden||document.msHidden||document.webkitHidden){if(this.onHidden)return this.onHidden()}else if(this.onVisible)return this.onVisible()},a}(),"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?module.exports=a:window.Idle=a}).call(this);
|
267
public/vendor/jquery-scrollspy.js
vendored
267
public/vendor/jquery-scrollspy.js
vendored
|
@ -1,267 +0,0 @@
|
|||
/*
|
||||
* jQuery ScrollSpy Plugin
|
||||
* Author: @sxalexander, softwarespot
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
(function jQueryScrollspy(window, $) {
|
||||
// Plugin Logic
|
||||
|
||||
$.fn.extend({
|
||||
scrollspy: function scrollspy(options, action) {
|
||||
// If the options parameter is a string, then assume it's an 'action', therefore swap the parameters around
|
||||
if (_isString(options)) {
|
||||
var tempOptions = action;
|
||||
|
||||
// Set the action as the option parameter
|
||||
action = options;
|
||||
|
||||
// Set to be the reference action pointed to
|
||||
options = tempOptions;
|
||||
}
|
||||
|
||||
// override the default options with those passed to the plugin
|
||||
options = $.extend({}, _defaults, options);
|
||||
|
||||
// sanitize the following option with the default value if the predicate fails
|
||||
_sanitizeOption(options, _defaults, 'container', _isObject);
|
||||
|
||||
// cache the jQuery object
|
||||
var $container = $(options.container);
|
||||
|
||||
// check if it's a valid jQuery selector
|
||||
if ($container.length === 0) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// sanitize the following option with the default value if the predicate fails
|
||||
_sanitizeOption(options, _defaults, 'namespace', _isString);
|
||||
|
||||
// check if the action is set to DESTROY/destroy
|
||||
if (_isString(action) && action.toUpperCase() === 'DESTROY') {
|
||||
$container.off('scroll.' + options.namespace);
|
||||
return this;
|
||||
}
|
||||
|
||||
// sanitize the following options with the default values if the predicates fails
|
||||
_sanitizeOption(options, _defaults, 'buffer', $.isNumeric);
|
||||
_sanitizeOption(options, _defaults, 'max', $.isNumeric);
|
||||
_sanitizeOption(options, _defaults, 'min', $.isNumeric);
|
||||
|
||||
// callbacks
|
||||
_sanitizeOption(options, _defaults, 'onEnter', $.isFunction);
|
||||
_sanitizeOption(options, _defaults, 'onLeave', $.isFunction);
|
||||
_sanitizeOption(options, _defaults, 'onLeaveTop', $.isFunction);
|
||||
_sanitizeOption(options, _defaults, 'onLeaveBottom', $.isFunction);
|
||||
_sanitizeOption(options, _defaults, 'onTick', $.isFunction);
|
||||
|
||||
if ($.isFunction(options.max)) {
|
||||
options.max = options.max();
|
||||
}
|
||||
|
||||
if ($.isFunction(options.min)) {
|
||||
options.min = options.min();
|
||||
}
|
||||
|
||||
// check if the mode is set to VERTICAL/vertical
|
||||
var isVertical = window.String(options.mode).toUpperCase() === 'VERTICAL';
|
||||
|
||||
return this.each(function each() {
|
||||
// cache this
|
||||
var _this = this;
|
||||
|
||||
// cache the jQuery object
|
||||
var $element = $(_this);
|
||||
|
||||
// count the number of times a container is entered
|
||||
var enters = 0;
|
||||
|
||||
// determine if the scroll is with inside the container
|
||||
var inside = false;
|
||||
|
||||
// count the number of times a container is left
|
||||
var leaves = 0;
|
||||
|
||||
// create a scroll listener for the container
|
||||
$container.on('scroll.' + options.namespace, function onScroll() {
|
||||
// cache the jQuery object
|
||||
var $this = $(this);
|
||||
|
||||
// create a position object literal
|
||||
var position = {
|
||||
top: $this.scrollTop(),
|
||||
left: $this.scrollLeft(),
|
||||
};
|
||||
|
||||
var containerHeight = $container.height();
|
||||
|
||||
var max = options.max;
|
||||
|
||||
var min = options.min;
|
||||
|
||||
var xAndY = isVertical ? position.top + options.buffer : position.left + options.buffer;
|
||||
|
||||
if (max === 0) {
|
||||
// get the maximum value based on either the height or the outer width
|
||||
max = isVertical ? containerHeight : $container.outerWidth() + $element.outerWidth();
|
||||
}
|
||||
|
||||
// if we have reached the minimum bound, though are below the max
|
||||
if (xAndY >= min && xAndY <= max) {
|
||||
// trigger the 'scrollEnter' event
|
||||
if (!inside) {
|
||||
inside = true;
|
||||
enters++;
|
||||
|
||||
// trigger the 'scrollEnter' event
|
||||
$element.trigger('scrollEnter', {
|
||||
position: position,
|
||||
});
|
||||
|
||||
// call the 'onEnter' function
|
||||
if (options.onEnter !== null) {
|
||||
options.onEnter(_this, position);
|
||||
}
|
||||
}
|
||||
|
||||
// trigger the 'scrollTick' event
|
||||
$element.trigger('scrollTick', {
|
||||
position: position,
|
||||
inside: inside,
|
||||
enters: enters,
|
||||
leaves: leaves,
|
||||
});
|
||||
|
||||
// call the 'onTick' function
|
||||
if (options.onTick !== null) {
|
||||
options.onTick(_this, position, inside, enters, leaves);
|
||||
}
|
||||
} else {
|
||||
if (inside) {
|
||||
inside = false;
|
||||
leaves++;
|
||||
|
||||
// trigger the 'scrollLeave' event
|
||||
$element.trigger('scrollLeave', {
|
||||
position: position,
|
||||
leaves: leaves,
|
||||
});
|
||||
|
||||
// call the 'onLeave' function
|
||||
if (options.onLeave !== null) {
|
||||
options.onLeave(_this, position);
|
||||
}
|
||||
|
||||
if (xAndY <= min) {
|
||||
// trigger the 'scrollLeaveTop' event
|
||||
$element.trigger('scrollLeaveTop', {
|
||||
position: position,
|
||||
leaves: leaves,
|
||||
});
|
||||
|
||||
// call the 'onLeaveTop' function
|
||||
if (options.onLeaveTop !== null) {
|
||||
options.onLeaveTop(_this, position);
|
||||
}
|
||||
} else if (xAndY >= max) {
|
||||
// trigger the 'scrollLeaveBottom' event
|
||||
$element.trigger('scrollLeaveBottom', {
|
||||
position: position,
|
||||
leaves: leaves,
|
||||
});
|
||||
|
||||
// call the 'onLeaveBottom' function
|
||||
if (options.onLeaveBottom !== null) {
|
||||
options.onLeaveBottom(_this, position);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Idea taken from: http://stackoverflow.com/questions/5353934/check-if-element-is-visible-on-screen
|
||||
var containerScrollTop = $container.scrollTop();
|
||||
|
||||
// Get the element height
|
||||
var elementHeight = $element.height();
|
||||
|
||||
// Get the element offset
|
||||
var elementOffsetTop = $element.offset().top;
|
||||
|
||||
if ((elementOffsetTop < (containerHeight + containerScrollTop)) && (elementOffsetTop > (containerScrollTop - elementHeight))) {
|
||||
// trigger the 'scrollView' event
|
||||
$element.trigger('scrollView', {
|
||||
position: position,
|
||||
});
|
||||
|
||||
// call the 'onView' function
|
||||
if (options.onView !== null) {
|
||||
options.onView(_this, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// Fields (Private)
|
||||
|
||||
// Defaults
|
||||
|
||||
// default options
|
||||
var _defaults = {
|
||||
// the offset to be applied to the left and top positions of the container
|
||||
buffer: 0,
|
||||
|
||||
// the element to apply the 'scrolling' event to (default window)
|
||||
container: window,
|
||||
|
||||
// the maximum value of the X or Y coordinate, depending on mode the selected
|
||||
max: 0,
|
||||
|
||||
// the maximum value of the X or Y coordinate, depending on mode the selected
|
||||
min: 0,
|
||||
|
||||
// whether to listen to the X (horizontal) or Y (vertical) scrolling
|
||||
mode: 'vertical',
|
||||
|
||||
// namespace to append to the 'scroll' event
|
||||
namespace: 'scrollspy',
|
||||
|
||||
// call the following callback function every time the user enters the min / max zone
|
||||
onEnter: null,
|
||||
|
||||
// call the following callback function every time the user leaves the min / max zone
|
||||
onLeave: null,
|
||||
|
||||
// call the following callback function every time the user leaves the top zone
|
||||
onLeaveTop: null,
|
||||
|
||||
// call the following callback function every time the user leaves the bottom zone
|
||||
onLeaveBottom: null,
|
||||
|
||||
// call the following callback function on each scroll event within the min and max parameters
|
||||
onTick: null,
|
||||
|
||||
// call the following callback function on each scroll event when the element is inside the viewable view port
|
||||
onView: null,
|
||||
};
|
||||
|
||||
// Methods (Private)
|
||||
|
||||
// check if a value is an object datatype
|
||||
function _isObject(value) {
|
||||
return $.type(value) === 'object';
|
||||
}
|
||||
|
||||
// check if a value is a string datatype with a length greater than zero when whitespace is stripped
|
||||
function _isString(value) {
|
||||
return $.type(value) === 'string' && $.trim(value).length > 0;
|
||||
}
|
||||
|
||||
// check if an option is correctly formatted using a predicate; otherwise, return the default value
|
||||
function _sanitizeOption(options, defaults, property, predicate) {
|
||||
// set the property to the default value if the predicate returned false
|
||||
if (!predicate(options[property])) {
|
||||
options[property] = defaults[property];
|
||||
}
|
||||
}
|
||||
}(window, window.jQuery));
|
1
public/vendor/lz-string.min.js
vendored
1
public/vendor/lz-string.min.js
vendored
|
@ -1 +0,0 @@
|
|||
var LZString=function(){function o(o,r){if(!t[o]){t[o]={};for(var n=0;n<o.length;n++)t[o][o.charAt(n)]=n}return t[o][r]}var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",t={},i={compressToBase64:function(o){if(null==o)return"";var r=i._compress(o,6,function(o){return n.charAt(o)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(e){return o(n,r.charAt(e))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(o){return null==o?"":""==o?null:i._decompress(o.length,16384,function(r){return o.charCodeAt(r)-32})},compressToUint8Array:function(o){for(var r=i.compress(o),n=new Uint8Array(2*r.length),e=0,t=r.length;t>e;e++){var s=r.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null===o||void 0===o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;t>e;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(o){return null==o?"":i._compress(o,6,function(o){return e.charAt(o)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(n){return o(e,r.charAt(n))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(o,r,n){if(null==o)return"";var e,t,i,s={},p={},u="",c="",a="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<o.length;i+=1)if(u=o.charAt(i),Object.prototype.hasOwnProperty.call(s,u)||(s[u]=f++,p[u]=!0),c=a+u,Object.prototype.hasOwnProperty.call(s,c))a=c;else{if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++),s[c]=f++,a=String(u)}if(""!==a){if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==r-1){d.push(n(m));break}v++}return d.join("")},decompress:function(o){return null==o?"":""==o?null:i._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(o,n,e){var t,i,s,p,u,c,a,l,f=[],h=4,d=4,m=3,v="",w=[],A={val:e(0),position:n,index:1};for(i=0;3>i;i+=1)f[i]=i;for(p=0,c=Math.pow(2,2),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(t=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 2:return""}for(f[3]=l,s=l,w.push(l);;){if(A.index>o)return"";for(p=0,c=Math.pow(2,m),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(l=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 2:return w.join("")}if(0==h&&(h=Math.pow(2,m),m++),f[l])v=f[l];else{if(l!==d)return null;v=s+s.charAt(0)}w.push(v),f[d++]=s+v.charAt(0),h--,s=v,0==h&&(h=Math.pow(2,m),m++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module&&(module.exports=LZString);
|
1
public/vendor/xss.min.js
vendored
1
public/vendor/xss.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -21,8 +21,8 @@
|
|||
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
|
||||
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
|
||||
<% } %>
|
||||
<script src="<%- url %>/vendor/idle.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/lz-string.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/Idle.Js/build/idle.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/lz-string/libs/lz-string.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/jquery/dist/jquery.min.js" defer></script>
|
||||
<!--codemirror-->
|
||||
<script src="<%- url %>/vendor/codemirror/codemirror.min.js" defer></script>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<script src="<%- url %>/vendor/inlineAttachment/codemirror.inline-attachment.js" defer></script>
|
||||
<script src="<%- url %>/vendor/codemirror-spell-checker/spell-checker.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/ot/ot.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/xss.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/xss/dist/xss.min.js" defer></script>
|
||||
<script src="<%- url %>/build/app.js" defer></script>
|
||||
<script src="<%- url %>/js/google-drive-upload.js" defer></script>
|
||||
<script src="<%- url %>/js/google-drive-picker.js" defer></script>
|
||||
|
|
|
@ -96,8 +96,8 @@
|
|||
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
|
||||
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
|
||||
<% } %>
|
||||
<script src="<%- url %>/vendor/lz-string.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/xss.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/lz-string/libs/lz-string.min.js" defer></script>
|
||||
<script src="<%- url %>/vendor/xss/dist/xss.min.js" defer></script>
|
||||
<script src="<%- url %>/js/reveal-markdown.js" defer></script>
|
||||
<script src="<%- url %>/build/public.js" defer></script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue