-
Notifications
You must be signed in to change notification settings - Fork 123
/
toggle_f_en.htm
250 lines (230 loc) · 9.7 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!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><br>
<a href="#" onclick="set_alt_preset('/alt-swf/2012.swf', 'video_id')">2012</a>
<br><br>
<a href="#" onclick="togglecustom()">nonstandard as2 modules</a>
<div id="custom_modules" style="display: none;">
<p>nonstandard as2 modules<br>
usually changing those is not needed, but should you need to, you can set paths to<br>
your own modules: cc_module (subtitles) and iv_module (annotations).<br>
those changes will only affect as2-based players (until early 2010).</p>
iv_module: <input id="fciv" style="width: 350px;"/><br>
cc_module: <input id="fccc" style="width: 350px;"/><br>
<a class="yt-button yt-button-primary" id="" href="#" onclick="save_fc();"><span>save</span></a>
</div>
<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>
<hr>
<h4 style="margin-top: 25px;">compatibility fixes</h4>
<p>if flash player doesn't show up on watchpages but works everywhere else, you can try<br>
the compatibility fixes listed below. <b>years in brackets indicate the players those settings<br>
will have an effect on.</b></p>
<input type="checkbox" id="compat-formats" title="list of available video qualities won't be sent. will cause other qualities to not show up in affected players.">
<label for="compat-formats">no quality list (2009)</label><br>
<input type="checkbox" id="compat-endscreen" title="related videos shown when the video ends won't be shown.">
<label for="compat-endscreen">no endscreen videos (2009-2010)</label><br>
<input type="checkbox" id="compat-modules" title="captions and annotations (2009-2012) and endscreen (2010) modules won't be sent.">
<label for="compat-modules">no modules (2009-2012)</label><br>
<a class="yt-button yt-button-primary" id="" href="#" onclick="save_compatibility();"><span>save</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;
}
}
}
// compatibility descriptions on labels
var labels = document.getElementsByTagName("input")
for(var label in labels) {
label = labels[label]
if(label.id && label.getAttribute("type") == "checkbox") {
var target = document.getElementsByTagName("label")
for(var p in target) {
if(target[p]
&& target[p].tagName
&& target[p].getAttribute("for") == label.id) {
target = target[p]
}
}
var labelText = label.getAttribute("title")
target.setAttribute("title", labelText)
}
}
// compatibility fix apply
function save_compatibility() {
var checkedCompatibility = []
for(var i in labels) {
i = labels[i]
if(i.id && i.getAttribute("type") == "checkbox" && i.checked) {
checkedCompatibility.push(i.id.replace("compat-", ""))
}
}
if(checkedCompatibility.length > 0) {
// save cookie if any set
document.cookie = "f_compat=" + checkedCompatibility.join()
+ "; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
} else {
// delete cookie if entirely unset
document.cookie = "f_compat=s; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
}
alert("ok")
}
// compatibility fix automark previous
if(document.cookie && document.cookie.indexOf("f_compat=") !== -1) {
var compat = document.cookie.split("f_compat=")[1].split(";")[0].split(",")
for(var s in compat) {
s = compat[s]
if(document.getElementById("compat-" + s)) {
document.getElementById("compat-" + s).setAttribute("checked", "true")
}
}
}
// custom as2 cc & iv
var shownCustom = false;
function togglecustom() {
shownCustom = !shownCustom;
if(shownCustom) {
document.getElementById("custom_modules").style.display = "block"
} else {
document.getElementById("custom_modules").style.display = "none"
}
}
function save_fc() {
var iv = document.getElementById("fciv").value
var cc = document.getElementById("fccc").value
if(iv && iv.indexOf("http") == 0) {
document.cookie = "f_civ=" + encodeURIComponent(iv) + "; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
} else {
document.cookie = "f_civ=a; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
}
if(cc && cc.indexOf("http") == 0) {
document.cookie = "f_ccc=" + encodeURIComponent(cc) + "; Path=/; expires=Fri, 31 Dec 2066 23:59:59 GMT"
} else {
document.cookie = "f_ccc=a; Path=/; expires=Fri, 31 Dec 2008 23:59:59 GMT"
}
alert("changes made!")
}
</script>
</body>
</html>