diff --git a/.cspell.json b/.cspell.json index 1b5650e..7853c90 100644 --- a/.cspell.json +++ b/.cspell.json @@ -1,8 +1,8 @@ { "version": "0.2", - "words": ["Merbivore"], + "words": ["dbaeumer", "fediverse", "Merbivore"], "allowCompoundWords": true, "language": "en,en-US", - "ignorePaths": ["*.css", ".cspell.json"], + "ignorePaths": ["*.css", ".cspell.json", "*.min.*"], "useGitignore": true } diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..ca441ef --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +*.min.* diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..a873810 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,11 @@ +{ + "root": true, + "env": { + "es6": true, + "node": true + }, + "extends": ["eslint:recommended"], + "rules": { + "no-undef": "off" + } +} diff --git a/.prettierignore b/.prettierignore index cb13d44..be421f4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ *.html *.min.* *.js +.cspell.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ad2854a..9c0bbcd 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "dbaeumer.vscode-eslint", "EditorConfig.EditorConfig", + "HTMLHint.vscode-htmlhint", "streetsidesoftware.code-spell-checker" ] } diff --git a/docs/index.html b/docs/index.html index f957bba..4aedd11 100644 --- a/docs/index.html +++ b/docs/index.html @@ -166,7 +166,7 @@

Other

- + diff --git a/docs/js/ie-warning.js b/docs/js/ie-warning.js deleted file mode 100644 index 6057c96..0000000 --- a/docs/js/ie-warning.js +++ /dev/null @@ -1,37 +0,0 @@ -function setCookie(name, value) { - if(name != '') - today = new Date(); - expires = new Date(today.getTime() + (8 * 7 * 86400000)); - document.cookie = name + '=' + value + '; expires=' + expires; -} - -function getCookie(name) { - if(name == '') - return(''); - - name_index = document.cookie.indexOf(name + '='); - - if(name_index == -1) - return(''); - - cookie_value = document.cookie.substr(name_index + name.length + 1, document.cookie.length); - - end_of_cookie = cookie_value.indexOf(';'); - if(end_of_cookie != -1) - cookie_value = cookie_value.substr(0, end_of_cookie); - - space = cookie_value.indexOf('+'); - while(space != -1) { - cookie_value = cookie_value.substr(0, space) + ' ' + - cookie_value.substr(space + 1, cookie_value.length); - space = cookie_value.indexOf('+'); - } - - return(cookie_value); -} - -if (getCookie('warning_has_shown') != 'yes') { - // your warning html url - var warning_url = 'ie-warning.html'; - location.href = warning_url+'?return='+location.href; -} diff --git a/docs/js/jquery.cookie.js b/docs/js/jquery.cookie.js deleted file mode 100644 index aebaa84..0000000 --- a/docs/js/jquery.cookie.js +++ /dev/null @@ -1,94 +0,0 @@ -/*! - * jQuery Cookie Plugin v1.3.1 - * https://github.com/carhartl/jquery-cookie - * - * Copyright 2013 Klaus Hartl - * Released under the MIT license - */ -(function (factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as anonymous module. - define(['jquery'], factory); - } else { - // Browser globals. - factory(jQuery); - } -}(function ($) { - - var pluses = /\+/g; - - function raw(s) { - return s; - } - - function decoded(s) { - return decodeURIComponent(s.replace(pluses, ' ')); - } - - function converted(s) { - if (s.indexOf('"') === 0) { - // This is a quoted cookie as according to RFC2068, unescape - s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); - } - try { - return config.json ? JSON.parse(s) : s; - } catch(er) {} - } - - var config = $.cookie = function (key, value, options) { - - // write - if (value !== undefined) { - options = $.extend({}, config.defaults, options); - - if (typeof options.expires === 'number') { - var days = options.expires, t = options.expires = new Date(); - t.setDate(t.getDate() + days); - } - - value = config.json ? JSON.stringify(value) : String(value); - - return (document.cookie = [ - config.raw ? key : encodeURIComponent(key), - '=', - config.raw ? value : encodeURIComponent(value), - options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path : '', - options.domain ? '; domain=' + options.domain : '', - options.secure ? '; secure' : '' - ].join('')); - } - - // read - var decode = config.raw ? raw : decoded; - var cookies = document.cookie.split('; '); - var result = key ? undefined : {}; - for (var i = 0, l = cookies.length; i < l; i++) { - var parts = cookies[i].split('='); - var name = decode(parts.shift()); - var cookie = decode(parts.join('=')); - - if (key && key === name) { - result = converted(cookie); - break; - } - - if (!key) { - result[name] = converted(cookie); - } - } - - return result; - }; - - config.defaults = {}; - - $.removeCookie = function (key, options) { - if ($.cookie(key) !== undefined) { - $.cookie(key, '', $.extend(options, { expires: -1 })); - return true; - } - return false; - }; - -})); diff --git a/docs/js/jquery.cookie.min.js b/docs/js/jquery.cookie.min.js new file mode 100644 index 0000000..c2e9ff8 --- /dev/null +++ b/docs/js/jquery.cookie.min.js @@ -0,0 +1,8 @@ +/*! + * jQuery Cookie Plugin v1.4.1 + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2006, 2014 Klaus Hartl + * Released under the MIT license + */ +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){var n=/\+/g;function o(e){return r.raw?e:encodeURIComponent(e)}function i(o,i){var t=r.raw?o:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(n," ")),r.json?JSON.parse(e):e}catch(e){}}(o);return e.isFunction(i)?i(t):t}var r=e.cookie=function(n,t,c){if(arguments.length>1&&!e.isFunction(t)){if("number"==typeof(c=e.extend({},r.defaults,c)).expires){var u=c.expires,s=c.expires=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*u)}return document.cookie=[o(n),"=",function(e){return o(r.json?JSON.stringify(e):String(e))}(t),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}for(var a,d=n?void 0:{},f=document.cookie?document.cookie.split("; "):[],p=0,l=f.length;p