aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2021-01-31 20:00:56 +0300
committerRblSb <msrblsb@gmail.com>2021-01-31 20:00:56 +0300
commitec90923038d902d7c0fa5220afd5b79650e17d47 (patch)
tree2e8a1a210fb63e76d455019b4a8a83ce1d7832f1 /res
parent8128d9d29ebdd4d64b44194b9bdb75cb888c3176 (diff)
Minor title input fix
Diffstat (limited to 'res')
-rw-r--r--res/client.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/res/client.js b/res/client.js
index 0f339f6..94af960 100644
--- a/res/client.js
+++ b/res/client.js
@@ -2416,6 +2416,7 @@ var client_players_Raw = function(main,player) {
this.isHlsLoaded = false;
this.playAllowed = true;
this.matchName = new EReg("^(.+)\\.(.+)","");
+ this.titleInput = window.document.querySelector("#mediatitle");
this.playerEl = window.document.querySelector("#ytapiplayer");
this.main = main;
this.player = player;
@@ -2429,7 +2430,7 @@ client_players_Raw.prototype = {
var _gthis = this;
var url = data.url;
var decodedUrl = decodeURIComponent(url.split("+").join(" "));
- var optTitle = this.cutOptionalTitle();
+ var optTitle = StringTools.trim(this.titleInput.value);
var title = HxOverrides.substr(decodedUrl,decodedUrl.lastIndexOf("/") + 1,null);
var isNameMatched = this.matchName.match(title);
if(optTitle != "") {
@@ -2451,6 +2452,7 @@ client_players_Raw.prototype = {
});
return;
}
+ this.titleInput.value = "";
var video = window.document.createElement("video");
video.src = url;
video.onerror = function(e) {
@@ -2470,12 +2472,6 @@ client_players_Raw.prototype = {
this.initHlsSource(video,url);
}
}
- ,cutOptionalTitle: function() {
- var titleInput = window.document.querySelector("#mediatitle");
- var optTitle = StringTools.trim(titleInput.value);
- titleInput.value = "";
- return optTitle;
- }
,loadHlsPlugin: function(callback) {
var _gthis = this;
client_JsApi.addScriptToHead("https://cdn.jsdelivr.net/npm/hls.js@latest",function() {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage