mirror of
https://github.com/Rafostar/clapper.git
synced 2025-09-03 18:01:58 +02:00
YouTube support. Closes #46
This commit is contained in:
11
src/misc.js
11
src/misc.js
@@ -1,4 +1,4 @@
|
||||
const { Gio, GstAudio, Gdk, Gtk } = imports.gi;
|
||||
const { Gio, Gdk, Gtk } = imports.gi;
|
||||
const Debug = imports.src.debug;
|
||||
|
||||
const { debug } = Debug;
|
||||
@@ -95,3 +95,12 @@ function getFormattedTime(time, showHours)
|
||||
const parsed = (hours) ? `${hours}:` : '';
|
||||
return parsed + `${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
function encodeHTML(text)
|
||||
{
|
||||
return text.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
Reference in New Issue
Block a user