A web-based drawing app
git clone git://soophie.de/outline
5
.firebaserc6
firebase-debug.log7
style.css8
public/js/firebase.js
1
const FIREBASE = {2
apiKey: atob('QUl6YVN5QzZVcFRpNVlYc1h6eFJ2aEo4Z1RWbnJtTkpCQ2JCMjBn'),3
authDomain: 'typable-website.firebaseapp.com',4
databaseURL: 'https://typable-website.firebaseio.com',5
projectId: 'typable-website',6
storageBucket: 'typable-website.appspot.com',7
messagingSenderId: '1097239723234',8
appId: '1:1097239723234:web:a9b8491f4778f46b96f2bb',9
measurementId: 'G-6881VEFYTQ'10
};1
export * from './firebase.js';12
const COLORS = [3
export const COLORS = [4
'#FFCDD2',5
'#E57373',6
'#F44336',
58
'#141414'59
];70
const PRIORITY_MODAL = [61
export const PRIORITY_MODAL = [62
'clear',63
'help'64
];75
const LOCALES = [66
export const LOCALES = [67
'en',68
'de',69
'fr',70
'zh'71
];82
export {83
FIREBASE,84
COLORS,85
PRIORITY_MODAL,86
LOCALES87
};
1
/**2
Creates a unique identifier based on the current date.4
@function uuid5
@return {number} The unique identifier.6
*/7
function uuid() {1
export function uuid() {2
return new Date().valueOf();3
}11
/**12
Creates a template Object to create HTMLElements.14
@function html15
@callback callback16
@return {Object} The template object.17
*/18
function html(callback) {5
export function html(callback) {6
return {7
build: function(args) {8
let template = document.createElement('template');
18
};19
}34
/**35
Creates an object which contains the queried HTMLElements.37
@function query38
@param {Object} args - The query object.39
@return {Object} The object containing node elements.40
*/41
function query(args) {21
export function query(args) {22
let result = {};23
if(typeof args === 'object') {24
for(let entry of Object.entries(args)) {
42
}43
}65
/**66
Prevents an event.68
@function prevent69
@param {Event} event - The event to prevent.70
*/71
function prevent(event) {45
export function prevent(event) {46
event.preventDefault();47
}75
/**76
Check if object variable is defined.78
@function support79
@param {Object} object - The object to check for.80
@return {boolean} The result of the validation.81
*/82
function support(object) {49
export function support(object) {50
return typeof object !== 'undefined';51
}86
/**87
Check if current page is the App page.89
@function isApp90
@return {boolean} The result of the validation.91
*/92
function isApp() {53
export function isApp() {54
return window.location.pathname === '/app';55
}96
export {97
uuid,98
html,99
query,100
prevent,101
support,102
isApp103
};57
export function isStandalone() {58
return ['fullscreen', 'standalone', 'minimal-ui'].some(function(display) {59
return window.matchMedia('(display-mode: ' + display + ')').matches;60
});61
}