forked from ftde0/yt2009
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoggle_f_en.htm
148 lines (135 loc) · 5.59 KB
/
toggle_f_en.htm
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html lang="pl">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link id="www-core-css" rel="stylesheet" href="www-core-vfl122413.css">
<title>f_mode</title>
</head>
<body class="date-20091111 en_US is-english">
<!-- begin masthead section -->
<div id="page" class="">
</div>
<div id="masthead-container">
<div id="masthead" class="">
<div id="masthead-utility" style="visibility: hidden;cursor: default;">
<span class="utility-item">
<a href="#"><strong>Create Account</strong></a>
<span class="utility-joiner">or</span>
<a href="#">Sign In</a>
</span>
</div>
<div id="masthead-nav-user">
<a href="/watch_queue?all" id="quicklist-nav" style="display: none;">QuickList (<span id="quicklist-nav-count">0</span>)</a>
<a href="/my_subscriptions?masthead=1">Subscriptions</a>
<a href="/my_history">History</a>
<a class="yt-button yt-button-urgent yt-button-short" id="" href="/my_videos_upload"><span>Upload</span></a>
</div>
<div id="masthead-end"></div>
</div>
</div>
<!-- end masthead section -->
<div id="baseDiv" class="date-20091111 video-info ">
<!-- begin top section -->
<a href="/toggle_f.htm">[pl]</a>
<h1>"f"</h1>
<h4>"f" - a yt2009 mode letting you watch content and adding layout fixes for older browsers.</h4>
<hr>
<h4>what "f" does:</h4>
<ul>
<li>uses the original flash player to play videos</li>
<li>adds a css file to fix various layout issues</li>
</ul>
<hr>
<h4 class="f_status" id="fmode-status">f mode: disabled.</h4>
<h4 style="margin-bottom: 25px;">click the button below to enable/disable f.</h4>
<a class="yt-button yt-button-primary" id="" href="#" onclick="toggle_f();"><span>switch</span></a>
<hr>
<h4 style="margin-top: 25px;">you can also set an alternative .swf file to play videos.</h4>
<h4>this can be useful - for example - when using yt2009 as a base for older/newer layouts.<br>
if you want to disable this feature, leave both of the text boxes empty and save.</h4>
full .swf file path: <input id="alt-swf-file" style="width: 350px;"/><br>
video id argument (defaults to video_id): <input id="alt-swf-id-arg" style="width: 350px;"/><br>
<a class="yt-button yt-button-primary" id="" href="#" onclick="save_alt_swf_settings();"><span>save</span></a>
<h4 style="margin-top: 25px;">presets</h4>
<a href="#" onclick="set_alt_preset('/alt-swf/e2006.swf', 'video_id')">early-2006</a><br>
<a href="#" onclick="set_alt_preset('/alt-swf/2006.swf', 'video_id')">standard 2006 player</a><br>
<a href="#" onclick="set_alt_preset('/alt-swf/2007ad.swf', 'vids')">a mainpage ad player from 2007</a><br>
<a href="#" onclick="set_alt_preset('/alt-swf/cps2.swf', 'video_id')">standard player with official dark theme</a><br>
<a href="#" onclick="set_alt_preset('/alt-swf/2010.swf', 'video_id')">late-2010</a>
<hr>
<h4 style="margin-top: 25px;">h264</h4>
<p>you can now enable h264 mp4 playback within the flash player.<br>
h264 lets you start playing videos way quicker and enables HD support.<br>
<b>h264 may not be supported depending on your browser, OS and the picked video player.</b></p>
<h4 id="fh264-status">h264: disabled.</h4>
<a class="yt-button yt-button-primary" id="" href="#" onclick="toggle_f_h264();"><span>switch</span></a>
<!-- end bottom section -->
</div>
<a name="pageBottom"></a>
<script>
// sprawdzanie czy włączony
var fOn = false;
if(document.cookie.indexOf("f_mode") !== -1) {
fOn = true;
document.getElementById("fmode-status").innerHTML = "f mode: enabled."
}
var fh264On = document.cookie.indexOf("f_h264") !== -1
if(fh264On) {
document.getElementById("fh264-status").innerHTML = "h264: enabled."
}
function toggle_f() {
if(fOn) {
// wyłącz f
document.cookie = "f_mode=on; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
} else {
// włącz f
document.cookie = "f_mode=on; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
}
location.reload()
}
function toggle_f_h264() {
if(fh264On) {
document.cookie = "f_h264=on; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
} else {
document.cookie = "f_h264=on; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
}
location.reload()
}
// alt-swf
function save_alt_swf_settings() {
var file = document.getElementById("alt-swf-file").value;
var arg = document.getElementById("alt-swf-id-arg").value;
if(!file && !arg) {
// clear the saved settings
document.cookie = "alt_swf_path=h; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
document.cookie = "alt_swf_arg=h; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
} else {
document.cookie = "alt_swf_path=" + encodeURIComponent(file) + "; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
document.cookie = "alt_swf_arg=" + arg + "; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
}
alert("saved")
}
function set_alt_preset(swf_path, arg) {
document.getElementById("alt-swf-file").value = swf_path;
document.getElementById("alt-swf-id-arg").value = arg;
}
// get alt swf preset
var cookies = (document.cookie || "").split(";")
for(var c in cookies) {
var cookie = cookies[c]
var name = cookie.split("=")[0].replace(" ", "")
var value = decodeURIComponent(cookie.split("=")[1])
switch(name) {
case "alt_swf_path": {
document.getElementById("alt-swf-file").value = value
break;
}
case "alt_swf_arg": {
document.getElementById("alt-swf-id-arg").value = value
break;
}
}
}
</script>
</body>
</html>