aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Main.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Main.hx')
-rw-r--r--src/client/Main.hx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index b9c9892..1d9ac34 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -242,7 +242,7 @@ class Main {
addVideo(link, atEnd, isTemp, () -> addVideoArray(links, atEnd, isTemp));
}
- function addVideo(url:String, atEnd:Bool, isTemp:Bool, callback:()->Void):Void {
+ public function addVideo(url:String, atEnd:Bool, isTemp:Bool, ?callback:()->Void):Void {
final protocol = Browser.location.protocol;
if (url.startsWith("/")) {
final host = Browser.location.hostname;
@@ -275,7 +275,7 @@ class Main {
},
atEnd: atEnd
}});
- callback();
+ if (callback != null) callback();
});
}
@@ -316,6 +316,14 @@ class Main {
});
}
+ public function removeVideoItem(url:String) {
+ send({
+ type: RemoveVideo, removeVideo: {
+ url: url
+ }
+ });
+ }
+
public function toggleVideoElement():Bool {
if (player.hasVideo()) player.removeVideo();
else if (!player.isListEmpty()) {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage