Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
astabeamer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
42loop
astabeamer
Commits
513ab21d
Commit
513ab21d
authored
5 years ago
by
42loop
Browse files
Options
Downloads
Patches
Plain Diff
scriptified
parent
756142ee
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
assets/init.js
+55
-0
55 additions, 0 deletions
assets/init.js
with
55 additions
and
0 deletions
assets/init.js
+
55
−
0
View file @
513ab21d
var
starthour
=
0
;
var
endhour
=
0
;
var
days
;
var
activedays
=
[];
var
datepickerDefaultOn
;
var
datepickerDefaultOff
;
var
currentimage
=
""
;
var
currentvideo
=
""
;
let
dayset
=
new
Set
();
...
...
@@ -33,6 +36,24 @@ function getfree()
}
function
getcurrent
()
{
var
client
=
new
HttpClient
();
loc
=
'
/getcurrent?
'
;
client
.
get
(
loc
,
function
(
response
)
{
i
=
response
.
split
(
"
|
"
)[
0
];
v
=
response
.
split
(
"
|
"
)[
1
];
console
.
log
(
i
,
v
);
document
.
getElementById
(
"
currentimage
"
).
innerHTML
=
i
;
document
.
getElementById
(
"
currentvideo
"
).
innerHTML
=
v
;
});
}
function
getcron
()
{
var
client
=
new
HttpClient
();
...
...
@@ -127,6 +148,36 @@ function dayclick(sender)
btn
.
style
.
visibility
=
"
visible
"
;
}
function
getimages
()
{
console
.
log
(
"
getimages
"
);
var
client
=
new
HttpClient
();
loc
=
'
/getimages?
'
;
console
.
log
(
loc
);
client
.
get
(
loc
,
function
(
response
)
{
//console.log(response);
imagelist
=
document
.
getElementById
(
"
images
"
);
imagelist
.
innerHTML
=
response
;
});
}
function
getvideos
()
{
console
.
log
(
"
getvideos
"
);
var
client
=
new
HttpClient
();
loc
=
'
/getvideos?
'
;
console
.
log
(
loc
);
client
.
get
(
loc
,
function
(
response
)
{
//console.log(response);
videolist
=
document
.
getElementById
(
"
videos
"
);
videolist
.
innerHTML
=
response
;
});
}
function
isloaded
()
{
...
...
@@ -165,4 +216,8 @@ function isloaded()
}
}
getfree
();
getcurrent
();
getimages
();
getvideos
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment