-
Notifications
You must be signed in to change notification settings - Fork 0
/
iFrameGadget
61 lines (56 loc) · 1.59 KB
/
iFrameGadget
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="example" />
<UserPref name="myname" display_name="URL" required="true" />
<Content type="html">
<![CDATA[
<!doctype html>
<html>
<head>
<style>
#box{
width: 1150px;
overflow: hidden;
}
#wrap {
width: 1150px;
height: 890px;
padding: 0;
overflow: hidden;
}
#frame {
width: 1280px;
height: 810px;
border: 0;
-ms-transform: scale(1.1);
-moz-transform: scale(1.1);
-o-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
-ms-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-o-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
}
</style>
</head>
<body>
<div id="box">
<div id="wrap">
<iframe id="frame" src=""></iframe>
</div>
</div>
</body>
<script type="text/javascript">
var prefs = new gadgets.Prefs();
function displayGreeting () {
var html = "";
var element = document.getElementById('frame').src = prefs.getString("myname");
}
gadgets.util.registerOnLoadHandler(displayGreeting);
</script>
</html>
]]>
</Content>
</Module>