Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
1734b5e4
Commit
1734b5e4
authored
Aug 24, 2011
by
Chris Gordon
Committed by
Joel Martin
Sep 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Helper function for viewport meta changes.
changeViewportMeta() now does viewport changes.
parent
7825b9ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
ui.js
include/ui.js
+20
-4
vnc.html
vnc.html
+1
-0
No files found.
include/ui.js
View file @
1734b5e4
...
...
@@ -502,12 +502,28 @@ zoomEnable();
function
zoomDisable
(){
//Change viewport meta data to disable zooming.
$
(
'head meta[name=viewport]'
).
remove
();
$
(
'head'
).
prepend
(
'<meta name="viewport" content="user-scalable=0" />'
);
changeViewportMeta
(
"user-scalable=0"
);
}
function
zoomEnable
(){
//Change viewport meta data to enable user zooming.
$
(
'head meta[name=viewport]'
).
remove
();
$
(
'head'
).
prepend
(
'<meta name="viewport" content="user-scalable=1" />'
);
changeViewportMeta
(
"user-scalable=1"
);
}
function
changeViewportMeta
(
newattributes
)
{
// First, get the array of meta-tag elements
var
metatags
=
document
.
getElementsByTagName
(
"meta"
);
// Update only the Viewport meta tag
for
(
var
cnt
=
0
;
cnt
<
metatags
.
length
;
cnt
++
)
{
var
name
=
metatags
[
cnt
].
getAttribute
(
"name"
);
var
content
=
metatags
[
cnt
].
getAttribute
(
"content"
);
// Update the Viewport meta tag
if
(
metatags
[
cnt
].
getAttribute
(
"name"
)
==
"viewport"
)
metatags
[
cnt
].
setAttribute
(
"content"
,
newattributes
);
}
}
vnc.html
View file @
1734b5e4
...
...
@@ -7,6 +7,7 @@
-->
<head>
<title>
noVNC
</title>
<meta
name=
"viewport"
content=
"user-scalable=1"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"chrome=1"
>
<link
rel=
"stylesheet"
href=
"include/plain.css"
>
<link
rel=
"alternate stylesheet"
href=
"include/black.css"
TITLE=
"Black"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment