Skip to content

Commit

Permalink
[UPDATE]Use Github as browser source
Browse files Browse the repository at this point in the history
  • Loading branch information
404LiverNotFound committed Nov 14, 2023
1 parent 06593cb commit 4c6f3a6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
13 changes: 7 additions & 6 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ function saveToFile(filename, text)
}

// getMainBG("title", "speaker")
const DefaultMainBGURL = "https://nisra.exps.pw/"
const DefaultMainBGURL = "http://127.0.0.1:5500/video.html" //"https://obs.nisra.net/title.html"
function getMainBG(title, speaker, bgColor)
{
return `${DefaultMainBGURL}?title=${encodeURI(title)}&speaker=${encodeURI(speaker)}&bg=${bgColor}`
return `${DefaultMainBGURL}?title=${encodeURI(title)}&speaker=${encodeURI(speaker)}`
}

// getCommentURL("http://z.fjucpc.tk:8080/messages", "slido", "youtube")
Expand All @@ -36,19 +36,20 @@ function getCommentURL(url, slido, youtube)
}

// getTextURL("text")
const DefaultTextUrl = "https://nisra.exps.pw/word.html?word="
function getTextURL(text)
const DefaultTextUrl = "http://127.0.0.1:5500/title.html?title="//"https://obs.nisra.net/title.html?title="
function getTextURL(text, opening)
{
text = encodeURI(text);
return `${DefaultTextUrl}${text}`
if (opening) return `${DefaultTextUrl}${text}`
else return `${DefaultTextUrl}${text}`
}

function generateSettingFile(commentURL, commentCSS, commentSlido, commentYoutube,
title, speaker, offText, byeText,
bgColor)
{
// off text
setting["sources"][1]["settings"]["url"] = getTextURL(offText);
setting["sources"][1]["settings"]["url"] = getTextURL(offText) + "&opening=true";
// bye text
setting["sources"][8]["settings"]["url"] = getTextURL(byeText);
// main bg
Expand Down
32 changes: 16 additions & 16 deletions js/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ setting = {
},
"scripts-tool": []
},
"name": "123",
"name": "NISRA_2023-11-14",
"preview_locked": false,
"quick_transitions": [
{
Expand Down Expand Up @@ -128,7 +128,7 @@ setting = {
"name": "On"
},
{
"name": "bye"
"name": "Bye"
}
],
"sources": [
Expand Down Expand Up @@ -274,14 +274,14 @@ setting = {
"locked": true,
"name": "screen",
"pos": {
"x": 64.0,
"y": 216.0
"x": 58.0,
"y": 180.0
},
"private_settings": {},
"rot": 0.0,
"scale": {
"x": 0.66666668653488159,
"y": 0.74074071645736694
"x": 0.78,
"y": 0.78
},
"scale_filter": "disable",
"visible": true
Expand All @@ -295,22 +295,22 @@ setting = {
"bounds_align": 0,
"bounds_type": 0,
"crop_bottom": 0,
"crop_left": 0,
"crop_right": 0,
"crop_left": 96,
"crop_right": 96,
"crop_top": 0,
"group_item_backup": false,
"id": 2,
"locked": true,
"name": "speaker",
"pos": {
"x": 1392.0,
"y": 712.0
"x": 1613.0,
"y": 773.0
},
"private_settings": {},
"rot": 0.0,
"scale": {
"x": 0.25,
"y": 0.27777779102325439
"x": 0.13,
"y": 0.13
},
"scale_filter": "disable",
"visible": true
Expand Down Expand Up @@ -361,8 +361,8 @@ setting = {
"locked": true,
"name": "comment",
"pos": {
"x": 1392.0,
"y": 112.0
"x": 1613.0,
"y": 180.0
},
"private_settings": {},
"rot": 0.0,
Expand Down Expand Up @@ -498,9 +498,9 @@ setting = {
"push-to-talk-delay": 0,
"settings": {
"css": "body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; font-size: 20px;}",
"height": 428,
"height": 480,
"url": "http://comment.nisra.net/?url=http://z.fjucpc.tk:8080/messages&slido=tz1joxgi",
"width": 480
"width": 250
},
"sync": 0,
"versioned_id": "browser_source",
Expand Down

0 comments on commit 4c6f3a6

Please sign in to comment.