├── html ├── global_message.html ├── post.html └── form_thread.html ├── state.json ├── .gitignore ├── error ├── pages ├── robots.txt ├── 404.html ├── feedback.html ├── news.html ├── sitemap.xml ├── contact.html ├── flash.html ├── advertise.html ├── security.html ├── legal.html ├── home.html └── press.html ├── track.sh ├── package.json ├── css ├── error.css ├── bans.css ├── md2016.css ├── global.css ├── yui.css ├── yotsubluemobile.css └── janichan.css ├── track.js └── javascripts ├── frontpage.js └── bans.js /html/global_message.html: -------------------------------------------------------------------------------- 1 | No global message -------------------------------------------------------------------------------- /state.json: -------------------------------------------------------------------------------- 1 | {"cssVersion":611,"jsVersion":993} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | cookies.json 3 | track*.log 4 | -------------------------------------------------------------------------------- /error: -------------------------------------------------------------------------------- 1 | An error occurred with the script, please check the console. -------------------------------------------------------------------------------- /pages/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: ia_archiver 2 | Disallow: / 3 | 4 | User-agent: * 5 | Disallow: 6 | 7 | Sitemap: http://www.4chan.org/sitemap.xml 8 | -------------------------------------------------------------------------------- /track.sh: -------------------------------------------------------------------------------- 1 | git pull --rebase origin master 2 | 3 | npm install --silent 4 | 5 | node track.js 6 | 7 | git add -A 8 | git commit -m "$(git status --porcelain)" 9 | git push origin master 10 | -------------------------------------------------------------------------------- /pages/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 404 Not Found 4 | 5 |

Not Found

6 |

The requested URL /404foobar was not found on this server.

7 |

Additionally, a 404 Not Found 8 | error was encountered while trying to use an ErrorDocument to handle the request.

9 | 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChanTracking", 3 | "description": "Tracking some website", 4 | "private": true, 5 | "dependencies": { 6 | "request": "2.62.x", 7 | "js-beautify": "1.5.x", 8 | "PrettyCSS": "0.3.x", 9 | "html": "0.0.7", 10 | "cheerio": "0.17.0", 11 | "tough-cookie": "2.0.0", 12 | "tough-cookie-filestore": "0.0.1", 13 | "winston": "2.2.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /css/error.css: -------------------------------------------------------------------------------- 1 | ul, ol, dl { 2 | margin: 0; 3 | } 4 | 5 | ol li { 6 | list-style: decimaloutside; 7 | } 8 | 9 | em { 10 | font-style: italic; 11 | } 12 | 13 | strong { 14 | font-weight: bold; 15 | } 16 | 17 | .boxcontent h3 { 18 | font-size: 116%; 19 | } 20 | 21 | .boxcontent h4 { 22 | font-weight: bold; 23 | } 24 | 25 | .boxcontent { 26 | color: black; 27 | line-height: 1.5em; 28 | } 29 | 30 | ul { 31 | margin-left: 0; 32 | } 33 | 34 | ol { 35 | margin-left: 0; 36 | } 37 | 38 | .boxcontent p { 39 | margin: .5em 0; 40 | } 41 | 42 | hr { 43 | border: 0; 44 | color: #800; 45 | background: #800; 46 | height: 1px; 47 | margin-top: 0; 48 | margin-bottom: 1.0em; 49 | } 50 | 51 | span.trip { 52 | color: #117743; 53 | } 54 | 55 | .postblock { 56 | background: #ffe; 57 | border: 1px solid #fca; 58 | color: #800; 59 | font-size: 116%; 60 | height: 2em; 61 | line-height: 2em; 62 | padding-left: .5em; 63 | padding-right: .5em; 64 | } 65 | 66 | ul li { 67 | list-style-type: none; 68 | } 69 | 70 | h2 { 71 | text-align: center; 72 | } 73 | 74 | #error-blurb { 75 | text-align: center; 76 | padding: 0 .5em; 77 | } 78 | 79 | .boxcontent img { 80 | display: block; 81 | margin: auto; 82 | } -------------------------------------------------------------------------------- /pages/feedback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Feedback - 4chan 6 | 7 | 8 | 9 | 17 | 18 | 19 |
20 |

4chan Feedback

21 |
22 |
23 |
24 |

Submit Feedback

25 |
26 |
27 | 28 | 36 |
37 | 38 | 39 | 40 | 41 |
42 |
54 | 55 | 56 |
57 |
58 |
59 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /pages/news.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | News - 4chan 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 25 |
26 |
27 |
28 | 4chan 29 |
30 |
31 |
32 |
33 |
34 |

News

35 |
36 |
37 |
38 |

ARE YA WINNING, ANON? by "The Team" - 10/01/20 @ 5:00AM EDT 39 | #

40 |

41 | Thanks again to our friend Ramen!
42 |
43 |
44 |

OLDER NEWS...

45 |
46 | Click here to view all news posts. 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
68 |
69 | 72 |
73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /pages/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | http://www.4chan.org/ 6 | 2015-01-08 7 | hourly 8 | 1.0 9 | 10 | 11 | http://www.4chan.org/rules 12 | 2015-01-08 13 | weekly 14 | 0.9 15 | 16 | 17 | http://www.4chan.org/news 18 | 2014-10-01 19 | monthly 20 | 0.9 21 | 22 | 23 | http://www.4chan.org/faq 24 | 2015-01-08 25 | monthly 26 | 0.9 27 | 28 | 29 | http://www.4chan.org/pass 30 | 2015-01-08 31 | monthly 32 | 0.9 33 | 34 | 35 | http://www.4chan.org/legal 36 | 2015-01-08 37 | monthly 38 | 0.8 39 | 40 | 41 | http://www.4chan.org/contests 42 | 2013-07-08 43 | monthly 44 | 0.7 45 | 46 | 47 | http://www.4chan.org/flash 48 | 2014-10-01 49 | monthly 50 | 0.8 51 | 52 | 53 | http://www.4chan.org/frames 54 | 2014-01-08 55 | monthly 56 | 0.0 57 | 58 | 59 | http://www.4chan.org/japanese 60 | 2008-11-21 61 | yearly 62 | 0.7 63 | 64 | 65 | http://www.4chan.org/feedback 66 | 2015-01-08 67 | monthly 68 | 0.8 69 | 70 | 71 | http://www.4chan.org/bans 72 | 2015-01-08 73 | daily 74 | 0.7 75 | 76 | 77 | http://www.4chan.org/banned 78 | 2015-01-14 79 | daily 80 | 0.0 81 | 82 | 83 | http://www.4chan.org/contests/bannerwin 84 | 2007-12-06 85 | yearly 86 | 0.6 87 | 88 | 89 | http://www.4chan.org/contests/imagewin 90 | 2007-12-06 91 | yearly 92 | 0.6 93 | 94 | 95 | http://www.4chan.org/contests/iconwin 96 | 2007-12-06 97 | yearly 98 | 0.6 99 | 100 | 101 | http://www.4chan.org/contests/logoreduxwin 102 | 2008-11-21 103 | yearly 104 | 0.6 105 | 106 | 107 | http://www.4chan.org/contests/logowin 108 | 2007-12-06 109 | yearly 110 | 0.6 111 | 112 | 113 | http://www.4chan.org/blotter 114 | 2008-02-29 115 | weekly 116 | 0.8 117 | 118 | 119 | http://www.4chan.org/news?all 120 | 2014-10-01 121 | monthly 122 | 0.8 123 | 124 | 125 | http://www.4chan.org/advertise 126 | 2015-01-08 127 | monthly 128 | 0.9 129 | 130 | 131 | http://www.4chan.org/press 132 | 2011-12-31 133 | monthly 134 | 0.9 135 | 136 | 137 | http://www.4chan.org/contact 138 | 2015-01-08 139 | monthly 140 | 0.8 141 | 142 | 143 | -------------------------------------------------------------------------------- /html/post.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 12 |
13 |
File: RMS.png (293 14 | KB, 450x399)
293 KB
293 KB PNG
16 |
17 | 32 |
The /g/ Wiki: 33 |
http://wiki.installgentoo.com/ 34 |
35 |
/g/ is for the discussion of technology and related topics. 36 |
/g/ is NOT your personal tech support team or personal consumer 37 | review site. 38 |
39 |
For tech support/issues with computers, use /wsr/ - Worksafe Requests or 40 | one of the following: 41 |
https://startpage.com/ or https://duckduckgo.com (i.e., 42 | fucking google it) 43 |
https://stackexchange.com/ 44 |
http://www.logicalincrements.com/ 45 |
46 |
You can also search the catalog for a specific term by using: 47 |
https://boards.4chan.org/g/searchwordor 48 | by clicking on [Search] 49 |
50 |
Always check the catalog before creating a thread: 51 |
52 |
Comment too long. Click here to view the full text. 53 |
54 |
55 | 57 |
-------------------------------------------------------------------------------- /pages/contact.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Contact - 4chan 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 |
27 | 4chan 28 |
29 |
30 |
31 |
32 |
33 |

Contact

34 |
35 |
36 |

Thank you for your interest in contacting 4chan!

37 |

Before proceeding, please ensure that your question hasn't already been answered on the Frequently Asked Questions or Feedback pages. 38 | Additional pages you might find useful include: News, Rules, Advertise, and Press.

39 |

Due to the high volume of e-mail we receive, we may not be able to respond to your inquiry immediately.

40 |

Note: Unban requests are not accepted via e-mail. All unban requests will be ignored. Appeal your ban using the built-in form!

41 |
42 |

via e-mail:

43 | 50 |

via contact form:

51 |
    52 |
  • Ban Appeals: Use the Ban Appeal form. Unban requests are not accepted via e-mail.
  • 53 |
  • General Support & Bug Reports: Use our Feedback page.
  • 54 |
  • Vulnerability Disclosure: Visit our Security page.
  • 55 |
56 |

via Twitter:

57 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
79 |
80 | 83 |
84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /html/form_thread.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 59 | 60 | 61 | 62 | 65 | 66 | 67 | 74 | 75 | 76 | 77 | 78 | 81 | 82 | 83 |
Name 11 | 12 |
Options 17 | 18 |
Subject 23 | 24 | 25 |
Comment 30 | 31 |
Verification 36 | 38 | 41 |
42 | 56 |
4chan Pass users can bypass this verification. [Learn More] [Login]
58 |
File 63 | 64 |
68 |
    69 |
  • Please read the Rules and FAQ before 70 | posting.
  • 71 |
  • You may highlight syntax and preserve whitespace by using [code] tags.
  • 72 |
73 |
79 |
80 |
84 | 85 | 86 | 87 | 90 | 91 | 92 | 93 | 94 | 95 | 97 | 98 | 99 | 100 | 102 | 103 | 104 | 105 | 107 | 108 | 109 | 110 | 111 | 113 | 114 | 115 |
88 |
89 |
05/04/17New trial board added: /bant/ - International/Random 96 |
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts 101 |
06/20/16New 4chan Banner Contest with a chance to win a 4chan Pass! See the contest page for 106 | details.
[Hide] [Show All] 112 |
-------------------------------------------------------------------------------- /pages/flash.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Flash - 4chan 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 |
27 | 4chan 28 |
29 |
30 |
31 | 93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
111 |
112 | 115 |
116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /css/bans.css: -------------------------------------------------------------------------------- 1 | /* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ 2 | 3 | body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td { 4 | margin: 0; 5 | padding: 0; 6 | } 7 | 8 | table { 9 | border-collapse: collapse; 10 | border-spacing: 0; 11 | } 12 | 13 | fieldset, img { 14 | border: 0; 15 | } 16 | 17 | address, caption, cite, code, dfn, em, strong, th, var { 18 | font-style: normal; 19 | font-weight: normal; 20 | } 21 | 22 | ol, ul { 23 | list-style: none; 24 | } 25 | 26 | caption, th { 27 | text-align: left; 28 | } 29 | 30 | h1, h2, h3, h4, h5, h6 { 31 | font-size: 100%; 32 | font-weight: normal; 33 | } 34 | 35 | q:before, q:after { 36 | content: ''; 37 | } 38 | 39 | abbr, acronym { 40 | border: 0; 41 | font-variant: normal; 42 | } 43 | 44 | sup { 45 | vertical-align: text-top; 46 | } 47 | 48 | sub { 49 | vertical-align: text-bottom; 50 | } 51 | 52 | input, textarea, select { 53 | font-family: inherit; 54 | font-size: inherit; 55 | font-weight: inherit; 56 | } 57 | 58 | input, textarea, legend { 59 | color: #000; 60 | } 61 | 62 | body { 63 | background: url('//s.4cdn.org/image/fade.png') repeat-x scroll center top #ffffee; 64 | font-family: 'Helvetica Neue', arial, sans-serif; 65 | margin: 5px 0 5px 0; 66 | padding: 0 5px; 67 | font-size: 13px; 68 | color: #800000; 69 | } 70 | 71 | header { 72 | text-align: center; 73 | } 74 | 75 | a { 76 | color: #0000ee; 77 | } 78 | 79 | #title { 80 | margin-top: 20px; 81 | font-size: 28px; 82 | font-weight: bold; 83 | letter-spacing: -2px; 84 | } 85 | 86 | #description { 87 | margin-top: 20px; 88 | } 89 | 90 | #log-entries { 91 | border-top: 1px solid #606060; 92 | table-layout: fixed; 93 | background-color: #fff; 94 | cursor: default; 95 | margin: auto; 96 | border-left: 1px solid #606060; 97 | border-right: 1px solid #606060; 98 | margin-top: 30px; 99 | color: #000; 100 | } 101 | 102 | #log-entries th { 103 | border-left: 1px solid #606060; 104 | background-color: #ffccaa; 105 | font-weight: bold; 106 | padding: 2px; 107 | text-align: center; 108 | } 109 | 110 | #log-entries td { 111 | border-left: 1px solid #606060; 112 | padding: 5px; 113 | vertical-align: top; 114 | text-align: center; 115 | } 116 | 117 | #log-entries tr { 118 | border-bottom: 1px solid #606060; 119 | } 120 | 121 | .col-board { 122 | width: 50px; 123 | font-weight: bold; 124 | } 125 | 126 | .col-action { 127 | width: 60px; 128 | } 129 | 130 | .col-post { 131 | width: 100px; 132 | } 133 | 134 | .col-time { 135 | width: 210px; 136 | } 137 | 138 | .preview-link { 139 | color: #0000ee; 140 | text-decoration: underline; 141 | } 142 | 143 | .exif { 144 | display: none; 145 | } 146 | 147 | /* Post previews */ 148 | 149 | #quote-preview { 150 | display: block; 151 | position: absolute; 152 | padding: 3px 6px 6px 3px; 153 | margin: 0; 154 | text-align: left; 155 | border-width: 1px 2px 2px 1px; 156 | border-style: solid; 157 | } 158 | 159 | #quote-preview.nws { 160 | color: #800000; 161 | border-color: #d9bfb7; 162 | } 163 | 164 | #quote-preview.ws { 165 | color: #000; 166 | border-color: #b7c5d9; 167 | } 168 | 169 | #quote-preview.ws a { 170 | color: #34345c; 171 | } 172 | 173 | #quote-preview input { 174 | margin: 3px 3px 3px 4px; 175 | } 176 | 177 | .ws.reply { 178 | background-color: #d6daf0; 179 | } 180 | 181 | .nws.reply { 182 | background-color: #f0e0d6; 183 | } 184 | 185 | .subject { 186 | font-weight: bold; 187 | } 188 | 189 | .ws .subject { 190 | color: #0f0c5d; 191 | } 192 | 193 | .nws .subject { 194 | color: #cc1105; 195 | } 196 | 197 | .quote { 198 | color: #789922; 199 | } 200 | 201 | .quotelink, .deadlink { 202 | color: #789922 !important; 203 | } 204 | 205 | .ws .useremail .postertrip, .ws .useremail .name { 206 | color: #34345c !important; 207 | } 208 | 209 | .nws .useremail .postertrip, .nws .useremail .name { 210 | color: #0000ee !important; 211 | } 212 | 213 | .nameBlock { 214 | display: inline-block; 215 | } 216 | 217 | .name { 218 | color: #117743; 219 | font-weight: bold; 220 | } 221 | 222 | .postertrip { 223 | color: #117743; 224 | font-weight: normal !important; 225 | } 226 | 227 | .postNum a { 228 | text-decoration: none; 229 | } 230 | 231 | .ws .postNum a { 232 | color: #000 !important; 233 | } 234 | 235 | .nws .postNum a { 236 | color: #800000 !important; 237 | } 238 | 239 | .fileInfo { 240 | margin-left: 20px; 241 | } 242 | 243 | .fileThumb { 244 | float: left; 245 | margin: 3px 20px 5px; 246 | } 247 | 248 | .fileThumb img { 249 | border: none; 250 | float: left; 251 | } 252 | 253 | s { 254 | background-color: #000000 !important; 255 | } 256 | 257 | .capcode { 258 | font-weight: bold !important; 259 | } 260 | 261 | .nameBlock.capcodeAdmin span.name, span.capcodeAdmin span.name a, span.capcodeAdmin span.postertrip, span.capcodeAdmin strong.capcode { 262 | color: #ff0000 !important; 263 | } 264 | 265 | .nameBlock.capcodeMod span.name, span.capcodeMod span.name a, span.capcodeMod span.postertrip, span.capcodeMod strong.capcode { 266 | color: #800080 !important; 267 | } 268 | 269 | .nameBlock.capcodeDeveloper span.name, span.capcodeDeveloper span.name a, span.capcodeDeveloper span.postertrip, span.capcodeDeveloper strong.capcode { 270 | color: #0000f0 !important; 271 | } 272 | 273 | .identityIcon { 274 | height: 16px; 275 | margin-bottom: -3px; 276 | width: 16px; 277 | } 278 | 279 | .postMessage { 280 | margin: 13px 40px 13px 40px; 281 | } 282 | 283 | .countryFlag { 284 | margin-bottom: -1px; 285 | padding-top: 1px; 286 | } 287 | 288 | .fileDeletedRes { 289 | height: 13px; 290 | width: 127px; 291 | } 292 | 293 | span.fileThumb, span.fileThumb img { 294 | float: none !important; 295 | margin-bottom: 0 !important; 296 | margin-top: 0 !important; 297 | } 298 | 299 | /* footer */ 300 | 301 | footer { 302 | width: 750px; 303 | border-top: 1px solid; 304 | margin: 25px auto 0; 305 | text-align: center; 306 | } 307 | 308 | footer ul { 309 | display: inline-block; 310 | } 311 | 312 | footer li:first-child { 313 | border-left: 1px solid; 314 | } 315 | 316 | footer li { 317 | display: block; 318 | float: left; 319 | border: 1px solid; 320 | border-top: none; 321 | border-left: none; 322 | padding-left: 1em; 323 | padding-right: 1em; 324 | padding-bottom: 2px; 325 | padding-top: 2px; 326 | background-color: #ffeedd; 327 | line-height: 1.1em; 328 | } 329 | 330 | footer li a { 331 | color: #880000; 332 | text-decoration: none; 333 | font-size: 12px; 334 | } 335 | 336 | footer li a:hover { 337 | color: #cc6633; 338 | } 339 | 340 | .current-page { 341 | background-color: #ffffee; 342 | border-top: 1px solid #ffffee; 343 | padding-bottom: 3px; 344 | position: relative; 345 | top: -1px; 346 | } 347 | 348 | #copyright { 349 | text-align: center; 350 | margin-top: 25px; 351 | margin-bottom: 1em; 352 | font-size: 11px; 353 | } -------------------------------------------------------------------------------- /pages/advertise.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Advertise - 4chan 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 |
27 | 4chan 28 |
29 |
30 |
31 |
32 |
33 |

Advertise

34 |
35 |
36 |

4chan is the original and largest English-language image board with over 20 million unique visitors monthly. Our boards cover a wide array of interests, including Video Games, Anime, Television, Film, Comics, Technology, Fitness, and Cars.

37 |

We offer self-serve advertising campaigns on a CPM bidding basis. Our self-serve system offers features such as board-targeting, geo-targeting, frequency capping, campaign scheduling, banner rotation, and detailed performance reporting.

38 | 41 |

For more information about self-serve campaigns, please e-mail advertise@4chan.org with details about what you'd like to advertise, 42 | your budget, and flight dates. A representative will respond to your inquiry as soon as possible.

43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |

Ad Units

52 |
53 |
54 |

55 | Positions/Dimensions: 728x90 Leaderboard in both header and footer positions in desktop view, 300x250 Medium Rectangle in both header and footer positions in mobile view)
56 | Format: JPG/PNG/GIF
57 | Example Placements: 58 |

59 |

60 | Desktop Header 61 | Desktop Footer 62 | Mobile Header 63 | Mobile Footer 64 |

65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |

Ad Guidelines

73 |
74 |
75 |
    76 |
  1. Creatives must be of acceptable quality, and "work safe."
  2. 77 |
  3. No ads inciting harassment or containing personal information will be accepted.
  4. 78 |
  5. No ads that are harmful or malicious in nature will be accepted. This includes landing pages with pop-ups, pop-unders, redirects, dialog box loops, malware, etc.
  6. 79 |
  7. You may not advertise products or services that violate United States or local law.
  8. 80 |
  9. Landing pages must match ad content (i.e. no "bait & switch" advertising).
  10. 81 |
  11. No creatives imitating video players, close or cancel buttons, download buttons, browser/system/anti-virus alerts, etc.
  12. 82 |
  13. Ads cannot purport to be "official" 4chan ads.
  14. 83 |
  15. We only accept banner ads in JPG, PNG, and GIF formats. We reserve the right to reject animated GIFs that are annoying, distracting, or otherwise objectionable.
  16. 84 |
  17. Purchasing any advertisement on 4chan does not exempt you from our strict "No Advertising" rule while posting on 4chan. You are purchasing a banner ad only, and not the ability to advertise your product/site/etc in regular posts.
  18. 85 |
  19. 4chan reserves the right to reject any and all advertising at its sole discretion.
  20. 86 |
87 | We will not accept ads for the following products or services: 88 |
    89 |
  • Gambling
  • 90 |
  • Controlled substances or paraphernalia
  • 91 |
  • Alcohol, tobacco, tobacco products, or prescription drugs
  • 92 |
  • Affiliate marketing (referrals, direct marketing, etc)
  • 93 |
  • Firearms, ammunition, or weapons
  • 94 |
  • Pirated software or hacking/cracking tools
  • 95 |
  • Discriminatory content, including content that promotes discrimination by race, ethnicity, nationality, religion, disability, gender, age, or sexual orientation
  • 96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |

Stats

104 |
105 |
106 |
    107 |
  • Page impressions per month: 500,000,000+
  • 108 |
  • Unique visitors per month: 20,000,000+
  • 109 |
  • Posts per day: 900,000-1,000,000
  • 110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |

Demographic

118 |
119 |
120 |
    121 |
  • Age: 18-34
  • 122 |
  • Gender: ~70% male, ~30% female
  • 123 |
  • Location: United States (47%), United Kingdom (7%), Canada (6%), Australia (4%), Germany (4%)
  • 124 |
  • Interests: Japanese culture, anime, manga, video games, 125 | comics, technology, music, movies
  • 126 |
  • Education: Majority attended or currently enrolled in college
  • 127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
145 |
146 | 149 |
150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /track.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | var request = require('request'); 5 | var jsBeautify = require('js-beautify'); 6 | var prettyCss = require('PrettyCSS'); 7 | var fs = require('fs'); 8 | var htmlBeautify = require('html'); 9 | var cheerio = require('cheerio'); 10 | var FileCookieStore = require('tough-cookie-filestore'); 11 | var winston = require('winston'); 12 | 13 | winston.add(winston.transports.File, { 14 | filename: 'track.log', 15 | maxsize: 1024 * 1024, 16 | maxFiles: 1 17 | }); 18 | 19 | try { 20 | fs.statSync('cookies.json'); 21 | } catch(e) { 22 | fs.writeFileSync('cookies.json', ''); 23 | } 24 | 25 | var cookieJar = request.jar(new FileCookieStore('cookies.json')); 26 | 27 | var state = {}; 28 | 29 | var inArray = function(a, n) { 30 | for (var i = 0; i < a.length; i++) { 31 | if (a[i] === n) { 32 | return true; 33 | } 34 | } 35 | return false; 36 | } 37 | 38 | var log = function(e) { 39 | winston.log('info', e); 40 | } 41 | 42 | var logError = function(e) { 43 | winston.error(e); 44 | console.trace(); 45 | fs.writeFileSync('error', 'An error occurred with the script, please check the console.'); 46 | } 47 | 48 | var loadState = function() { 49 | try { 50 | var fileState = fs.readFileSync('state.json'); 51 | if (fileState) { 52 | state = JSON.parse(fileState); 53 | } 54 | } catch(e) { 55 | logError(e); 56 | } 57 | } 58 | 59 | var saveState = function() { 60 | fs.writeFileSync('state.json', JSON.stringify(state)); 61 | } 62 | 63 | var get = function(url, callback, goodCodes) { 64 | var goodCodes = goodCodes === undefined ? [200] : goodCodes; 65 | 66 | log('Getting ' + url); 67 | request({ 68 | url: url, 69 | jar: cookieJar, 70 | headers: { 71 | 'User-Agent': 'curl' 72 | } 73 | }, function(error, response, body) { 74 | if (error) { 75 | winston.error(error); 76 | } else { 77 | if (inArray(goodCodes, response.statusCode)) { 78 | log('Got ' + url); 79 | callback(body); 80 | } else if ((response.statusCode >= 500 && response.statusCode < 600) || response.statusCode == 409) { 81 | // Server error / overloaded, ignore 82 | log('Got ' + response.statusCode + ' getting ' + url); 83 | } else { 84 | logError('Error loading ' + url + ' (' + response.statusCode + '): ' + error); 85 | } 86 | } 87 | }); 88 | } 89 | 90 | var loadJsonAndBeautify = function(url, name) { 91 | get(url, function(body) { 92 | log('Beautifying ' + name); 93 | var nice = jsBeautify.js_beautify(body, { "preserve_newlines": false }); 94 | 95 | fs.writeFileSync(name, nice); 96 | }); 97 | } 98 | 99 | var loadCssAndBeautify = function(url, name) { 100 | get(url, function(body) { 101 | log('Beautifying ' + name + '.css'); 102 | var nice = prettyCss.parse(body); 103 | 104 | fs.writeFileSync('css/' + name + '.css', nice); 105 | }); 106 | } 107 | 108 | var loadFile = function(url, name, goodCodes) { 109 | get(url, function(body) { 110 | fs.writeFileSync(name, body); 111 | }, goodCodes); 112 | } 113 | 114 | var load = function() { 115 | try { 116 | fs.unlinkSync('error'); 117 | } catch (e) {}; 118 | 119 | loadState(); 120 | 121 | var now = Date.now(); 122 | 123 | get('https://boards.4chan.org/g/', function(body) { 124 | var dom = cheerio.load(body); 125 | var sticky = dom('#t51971506'); 126 | var stickyHtml = sticky.html(); 127 | // Force 0 128 | stickyHtml = stickyHtml.replace(/\d.t.4cdn.org/gi, '0.t.4cdn.org'); 129 | fs.writeFileSync('html/post.html', htmlBeautify.prettyPrint(stickyHtml)); 130 | 131 | var newThread = dom('form[name=post]'); 132 | fs.writeFileSync('html/form_thread.html', htmlBeautify.prettyPrint(newThread.html())); 133 | 134 | var globalMessage = dom('div.globalMessage').html(); 135 | fs.writeFileSync('html/global_message.html', globalMessage === null ? 'No global message' : htmlBeautify.prettyPrint(globalMessage)); 136 | }); 137 | 138 | loadJsonAndBeautify('https://a.4cdn.org/boards.json', 'api/boards.json'); 139 | 140 | get('https://www.4chan.org/', function(body) { 141 | body = body.replace(/Total Posts:.+?<\/div>/gi, 'Total Posts snip'); 142 | body = body.replace(/Current Users:.+?<\/div>/gi, 'Current Users snip'); 143 | body = body.replace(/Active Content:.+?<\/div>/gi, 'Active Content snip'); 144 | 145 | body = body.replace(/
[\s\S]+
/gi, 146 | 'Popular Threads snip\n
') 147 | 148 | fs.writeFileSync('pages/home.html', body); 149 | }); 150 | 151 | get('https://www.4chan.org/pass', function(body) { 152 | body = body.replace(/var temp_id = '[\w]+'/gi, 'var temp_id = \'snip\''); 153 | body = body.replace(/'temp_id', '[\w]+'/gi, '\'temp_id\', \'snip\''); 154 | body = body.replace(/name="temp_id" value="([^"]*)"/gi, 'name="temp_id" value="snip"'); 155 | 156 | fs.writeFileSync('pages/pass.html', body); 157 | }); 158 | 159 | get('https://www.4channel.org/pass', function(body) { 160 | body = body.replace(/var temp_id = '[\w]+'/gi, 'var temp_id = \'snip\''); 161 | body = body.replace(/'temp_id', '[\w]+'/gi, '\'temp_id\', \'snip\''); 162 | body = body.replace(/name="temp_id" value="([^"]*)"/gi, 'name="temp_id" value="snip"'); 163 | 164 | fs.writeFileSync('pages/4channel_pass.html', body); 165 | }); 166 | 167 | 168 | loadFile('https://www.4chan.org/faq', 'pages/faq.html'); 169 | loadFile('https://www.4chan.org/rules', 'pages/rules.html'); 170 | loadFile('https://www.4chan.org/4channews.php', 'pages/news.html'); 171 | // loadFile('https://www.4chan.org/blotter', 'pages/blotter.html'); 172 | loadFile('https://www.4chan.org/legal', 'pages/legal.html'); 173 | loadFile('https://www.4chan.org/security', 'pages/security.html'); 174 | loadFile('https://www.4chan.org/feedback', 'pages/feedback.html'); 175 | loadFile('https://www.4chan.org/advertise', 'pages/advertise.html'); 176 | loadFile('https://www.4chan.org/press', 'pages/press.html'); 177 | loadFile('https://www.4chan.org/contact', 'pages/contact.html'); 178 | loadFile('https://www.4chan.org/flash', 'pages/flash.html'); 179 | loadFile('https://www.4chan.org/404foobar', 'pages/404.html', [404]); 180 | loadFile('https://www.4chan.org/robots.txt', 'pages/robots.txt'); 181 | loadFile('https://www.4chan.org/sitemap.xml', 'pages/sitemap.xml'); 182 | 183 | loadFile('https://s.4cdn.org/js/core.' + now + '.js', 'javascripts/core.js'); 184 | loadFile('https://s.4cdn.org/js/extension.' + now + '.js', 'javascripts/extension.js'); 185 | loadFile('https://s.4cdn.org/js/catalog.' + now + '.js', 'javascripts/catalog.js'); 186 | loadFile('https://s.4cdn.org/js/bans.' + now + '.js', 'javascripts/bans.js'); 187 | loadFile('https://s.4cdn.org/js/frontpage.' + now + '.js', 'javascripts/frontpage.js'); 188 | 189 | loadCssAndBeautify('https://s.4cdn.org/css/yotsubluenew.' + now + '.css', 'yotsubluenew'); 190 | loadCssAndBeautify('https://s.4cdn.org/css/yotsubanew.' + now + '.css', 'yotsubanew'); 191 | loadCssAndBeautify('https://s.4cdn.org/css/futabanew.' + now + '.css', 'futubanew'); 192 | loadCssAndBeautify('https://s.4cdn.org/css/burichannew.' + now + '.css', 'burichannew'); 193 | loadCssAndBeautify('https://s.4cdn.org/css/photon.' + now + '.css', 'photon'); 194 | loadCssAndBeautify('https://s.4cdn.org/css/tomorrow.' + now + '.css', 'tomorrow'); 195 | loadCssAndBeautify('https://s.4cdn.org/css/yotsubluemobile.' + now + '.css', 'yotsubluemobile'); 196 | loadCssAndBeautify('https://s.4cdn.org/css/yui.' + now + '.css', 'yui'); 197 | loadCssAndBeautify('https://s.4cdn.org/css/janichan.' + now + '.css', 'janichan'); 198 | loadCssAndBeautify('https://s.4cdn.org/css/global.' + now + '.css', 'global'); 199 | loadCssAndBeautify('https://s.4cdn.org/css/spooky.' + now + '.css', 'spooky'); 200 | loadCssAndBeautify('https://s.4cdn.org/css/md2016.' + now + '.css', 'md2016'); 201 | loadCssAndBeautify('https://s.4cdn.org/css/error.' + now + '.css', 'error'); 202 | loadCssAndBeautify('https://s.4cdn.org/css/bans.' + now + '.css', 'bans'); 203 | loadCssAndBeautify('https://s.4cdn.org/css/spooky2017.' + now + '.css', 'spooky2017'); 204 | } 205 | 206 | process.on('uncaughtException', function(e) { 207 | logError(e); 208 | }); 209 | 210 | load(); 211 | 212 | })(); 213 | -------------------------------------------------------------------------------- /pages/security.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Security - 4chan 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 |
27 | 4chan 28 |
29 |
30 |
31 |
32 |
33 |

4chan Vulnerability Disclosure Program

34 |
35 |
36 |

These Program Rules provide our guidelines for reporting vulnerabilities to 4chan.

37 |

If you believe you have identified a security vulnerability that could impact 4chan or its users, we ask you notify us right away. We will investigate all legitimate reports and do our best to quickly fix the problem. We request you follow our Vulnerability Disclosure Program Rules and HackerOne's Vulnerability Disclosure Guidelines and make a good faith effort to avoid privacy violations, destruction of data, and interruption or degradation of our service during your research. And in keeping with 4chan's principles, feel free to submit your report using a pseudonym.

38 |

Note: This program is meant for vulnerabilities and security-related bugs. If you have a general bug report or site feedback, please submit it on our Feedback page.

39 |

Scope

40 |

Websites and services operated by 4chan, which include:

41 |

  • *.4chan.org
  • 42 |
  • *.4cdn.org

43 |

Please do not submit:

44 |

  • Vulnerabilities reported by automated vulnerability scanning tools, unless you have a working proof-­of-­concept or reason to believe that this issue is exploitable. Many issues reported by these tools are low-hanging fruit and do not have a clear security implication for 4chan.
  • 45 |
  • Vulnerabilities that rely on social engineering to be exploitable.
  • 46 |
  • Clickjacking (X-Frame-Options), HSTS (Strict-Transport-Security), Internet Explorer specific headers (X-Content-Type and X-XSS-Protection), and HttpOnly cookie reports. We already set these headers where we feel appropriate.

47 |

Scope is limited strictly to software and hardware vulnerabilities—not people. As such, 4chan users, volunteers (janitors, moderators, etc), customers (4chan Pass users, advertisers, etc), and employees are entirely out of scope of this program.

48 |

Third-party software and services that we use, such as nginx and CloudFlare, should be reported to the appropriate parties and are not eligible for a reward from us. We'd appreciate a head's up and will credit you on our Thanks page though!

49 |

Eligibility & Disclosure

50 |

In order for your submission to be eligible:

51 |

  • You must agree to all of our Vulnerability Disclosure Program Rules (this entire page).
  • 52 |
  • You must follow HackerOne's Vulnerability Disclosure Guidelines.
  • 53 |
  • You must be the first person to responsibly disclose an unknown issue to us.
  • 54 |
  • You must immediately report any vulnerability that allows access to personally identifiable information (PII), not copy or disseminate any PII obtained, and destroy any and all PII in your possession.
  • 55 |
  • Please consolidate similar vulnerabilities across multiple files/domains into one report. Multiple reports of what is essentially the same vulnerability will be discarded and treated as one report.
  • 56 |
  • All legitimate reports will be reviewed and assessed by 4chan's developer team to determine eligibility.
  • 57 |
  • As mentioned in our Rules, 4chan's website and services are not intended for, or designed to attract, individuals under the age of 18. Reporters under the age of 18 will not be eligible to receive rewards.

58 |

Rewards

59 |

For each eligible vulnerability report, the reporter will receive:

60 |

63 |

Exclusions

64 |

The following conditions are out of scope for our vulnerability disclosure program:

65 |

  • Physical attacks against 4chan users, volunteers, customers, employees, offices, and data centers.
  • 66 |
  • Social engineering of 4chan users, volunteers, customers, employees, or service providers.
  • 67 |
  • Knowingly posting, transmitting, uploading, linking to, or sending any malware.
  • 68 |
  • Pursuing vulnerabilities which send unsolicited bulk or unauthorized messages (spam), and/or denial of service (DoS) attacks.
  • 69 |
  • Any vulnerability obtained through the compromise of a 4chan user, volunteer, customer, or employee account. If your vulnerability allows you to compromise one of these accounts, please report it to us immediately and do not press further without written permission.

70 |

Submissions & Questions?

71 |

Send us an e-mail at security@4chan.org.

72 |
73 |
74 |
75 |
76 |
77 |
78 |

Thanks to...

79 |
80 |
81 |

82 |

    83 |
  • atom
  • 84 |
  • evanricafort0x003
  • 85 |
  • ng1
  • 86 |
  • rahulpratap
  • 87 |
  • reactors08
  • 88 |
  • tweetketan
  • 89 |
  • shubham
  • 90 |
  • ajaysinghnegi
  • 91 |
  • petyalevkin
  • 92 |
  • pranav
  • 93 |
  • adrianbelen
  • 94 |
  • fuzzbaba
  • 95 |
  • gopinath6
  • 96 |
  • prayas
  • 97 |
  • simon90
  • 98 |
  • xss
  • 99 |
  • hectorsschmector
  • 100 |
101 |

102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
122 |
123 | 126 |
127 |
128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /pages/legal.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Legal - 4chan 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 |
27 | 4chan 28 |
29 |
30 |
31 |
32 |
33 |

DMCA Policy

34 |
35 |
36 |

4chan community support LLC ("Company" or "we") has adopted the following general policy toward copyright infringement in accordance with the Digital Millennium Copyright Act (http://www.copyright.gov/legislation/dmca.pdf). The address of the Designated Agent to Receive Notification of Claimed Infringement ("Designated Agent") is listed at the end of this policy.

37 |

Procedure for Reporting Copyright Infringement:

38 |

If you believe that material or content residing on or accessible through Company's websites or services infringes a copyright, please send a notice of copyright infringement containing the following information to the Designated Agent listed below: 39 |

    40 |
  1. A physical or electronic signature of a person authorized to act on behalf of the owner of the copyright that has been allegedly infringed;
  2. 41 |
  3. Identification of works or materials being infringed;
  4. 42 |
  5. Identification of the material that is claimed to be infringing including information regarding the location of the infringing materials that the copyright owner seeks to have removed, with sufficient detail so that Company is capable of finding and verifying its existence;
  6. 43 |
  7. Contact information about the notifier including address, telephone number and, if available, e-mail address;
  8. 44 |
  9. A statement that the notifier has a good faith belief that the material is not authorized by the copyright owner, its agent, or the law; and
  10. 45 |
  11. A statement made under penalty of perjury that the information provided is accurate and the notifying party is authorized to make the complaint on behalf of the copyright owner.
  12. 46 |
47 |

48 |

Once Proper Bona Fide Infringement Notification is Received by the Designated Agent:

49 |

It is Company's policy: 50 |

    51 |
  1. To remove or disable access to the infringing material;
  2. 52 |
  3. To notify the content provider, member or user that it has removed or disabled access to the material; and
  4. 53 |
  5. That repeat offenders will have the infringing material removed from the system and that Company will terminate such content provider's, member's or user's access to the service.
  6. 54 |
55 |

56 |

Procedure to Supply a Counter-Notice to the Designated Agent:

57 |

If the content provider, member or user believes that the material that was removed or to which access was disabled is either not infringing, or the content provider, member or user believes that it has the right to post and use such material from the copyright owner, the copyright owner's agent, or pursuant to the law, the content provider, member or user must send a counter-notice containing the following information to the Designated Agent listed below: 58 |

    59 |
  1. A physical or electronic signature of the content provider, member or user;
  2. 60 |
  3. Identification of the material that has been removed or to which access has been disabled and the location at which the material appeared before it was removed or disabled;
  4. 61 |
  5. A statement that the content provider, member or user has a good faith belief that the material was removed or disabled as a result of mistake or a misidentification of the material; and
  6. 62 |
  7. Content provider's, member's or user's name, address, telephone number, and, if available, e-mail address and a statement that such person or entity consents to the jurisdiction of the Federal Court for the judicial district in which the content provider's, member's or user's address is located, or if the content provider's, member's or user's address is located outside the United States, for any judicial district in which Company is located, and that such person or entity will accept service of process from the person who provided notification of the alleged infringement.
  8. 63 |
64 | If a counter-notice is received by the Designated Agent, Company may send a copy of the counter-notice to the original complaining party informing that person that it may replace the removed material or cease disabling it in 10 business days. Unless the copyright owner files an action seeking a court order against the content provider, member or user, the removed material may be replaced or access to it restored in 10 to 14 business days or more after receipt of the counter-notice, at Company's discretion.

65 |
66 |

When submitting your notification of claimed copyright infringement, please ensure the following criteria have been met: 67 |

    68 |
  1. Your notice concerns copyrighted material that is hosted on a domain operated by Company, such as 4chan.org or 4cdn.org. We are unable to remove or disable access to copyrighted material located on other domains, such as those operated by third-parties who archive and re-host content originally posted to Company's website or services. 69 |
  2. Clearly note the specific location(s) — e.g. 4chan URL(s) — of the copyrighted material referenced in your notice.
  3. 70 |
  4. You understand that as permitted by law, we may forward a complete copy of your notice (including your name, contact information, et cetera) to the user(s) who submitted the copyrighted material referenced in your notice.
  5. 71 |
  6. You understand that you may be liable for damages (including Company's costs and attorneys' fees) if you make material misrepresentations in your notice or counter-notice, including your identifying information and if you misrepresent that the material is infringing your copyright. We reserve the right to seek and collect these damages.
  7. 72 |
73 |

74 |

Please contact the Designated Agent to Receive Notification of Claimed Infringement for Company at dmca@4chan.org or at:

75 |

4chan community support LLC
76 | ATTN: DMCA Agent
77 | 2885 Sanford Ave Sw #34441
78 | Grandville Mi 49418-1342

79 | Telephone: (267) 608-1710
80 | Fax: (877) 763-2948 ext. 34441
81 | E-mail: dmca@4chan.org

82 |

Note: We strongly recommend sending notices via e-mail for quickest response.

83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
103 |
104 | 107 |
108 |
109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /css/md2016.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | color: #000; 4 | font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif; 5 | font-size: 14px; 6 | font-weight: 400; 7 | line-height: 20px; 8 | padding: 0; 9 | margin: 0; 10 | } 11 | 12 | .board { 13 | background: #e5e5e5; 14 | border-top: 1px solid #ccc; 15 | margin-bottom: 50px; 16 | padding-bottom: 25px; 17 | } 18 | 19 | .is_index .board { 20 | padding-bottom: 50px; 21 | } 22 | 23 | a, a:visited, .quoteLink, .quotelink, .deadlink, div#boardNavMobile .pageJump a, .persistentNav .pageJump a, .summary a.replylink, div.post div.postInfo span.postNum a:visited, div.post div.postInfo span.postNum a.replylink { 24 | color: rgb(83, 109, 254) !important; 25 | text-decoration: none !important; 26 | } 27 | 28 | a:hover, .quoteLink:hover, .quotelink:hover, .deadlink:hover, .summary a.replylink:hover, .persistentNav .pageJump a:hover, div#boardNavMobile .pageJump a:hover, div.post div.postInfo span.postNum a:hover, .posteruid .hand:hover { 29 | color: rgb(83, 109, 254) !important; 30 | text-decoration: underline !important; 31 | } 32 | 33 | .postInfo a.postMenuBtn, .postInfo a.postMenuBtn:hover { 34 | color: rgb(83, 109, 254) !important; 35 | text-decoration: none !important; 36 | } 37 | 38 | div.postContainer { 39 | display: block; 40 | width: 80%; 41 | margin: 15px auto 0 auto; 42 | } 43 | 44 | .thread { 45 | margin-top: 30px !important; 46 | padding-top: 15px; 47 | border-top: 1px solid #ccc; 48 | } 49 | 50 | .thread:first-child { 51 | padding-top: 0; 52 | border-top: none; 53 | } 54 | 55 | .md-plus-btn { 56 | border-radius: 50%; 57 | font-size: 24px; 58 | height: 56px; 59 | margin: auto; 60 | min-width: 56px; 61 | width: 56px; 62 | padding: 0; 63 | overflow: hidden; 64 | box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.24); 65 | position: relative; 66 | line-height: normal; 67 | position: fixed; 68 | right: 25px; 69 | bottom: 25px; 70 | } 71 | 72 | div.boardBanner > div.boardTitle { 73 | margin-top: 40px; 74 | font-size: 36px; 75 | color: #676767; 76 | margin-bottom: 40px; 77 | font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif; 78 | font-weight: normal; 79 | letter-spacing: 0; 80 | } 81 | 82 | :-ms-input-placeholder { 83 | color: rgba(0, 0, 0, 0.35); 84 | } 85 | 86 | ::-webkit-input-placeholder { 87 | color: rgba(0, 0, 0, 0.35); 88 | } 89 | 90 | :-moz-placeholder { 91 | color: rgba(0, 0, 0, 0.35); 92 | } 93 | 94 | ::-moz-placeholder { 95 | color: rgba(0, 0, 0, 0.35); 96 | } 97 | 98 | #togglePostFormLink, .ad-plea, #blotter tfoot td, #ctrl-top, div.post div.postInfo span.postNum, div.pagelist div.pages { 99 | color: transparent; 100 | } 101 | 102 | table.postForm > tbody > tr > td:first-child, .thread-stats { 103 | color: #000; 104 | } 105 | 106 | .postInfo .backlink a.quotelink, .postInfo .backlink a.quotelink:hover { 107 | color: rgb(83, 109, 254) !important; 108 | } 109 | 110 | .ws input[type="text"], .nws input[type="text"] { 111 | border: none !important; 112 | border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important; 113 | font-size: 14px !important; 114 | font-family: "Helvetica", "Arial", sans-serif; 115 | padding: 4px !important; 116 | -webkit-transition: border-bottom-color 0.2s; 117 | transition: border-bottom-color 0.2s; 118 | } 119 | 120 | .ws input[type="text"]:focus, .ws #quickReply input[type="submit"]:focus { 121 | border-bottom: 1px solid rgb(83, 109, 254) !important; 122 | } 123 | 124 | .nws input[type="text"]:focus, .nws #quickReply input[type="submit"]:focus { 125 | border-bottom: 1px solid rgb(244, 67, 54) !important; 126 | } 127 | 128 | .tomorrow .extPanel, .recaptcha_input_area #recaptcha_response_field { 129 | border: 0 !important; 130 | } 131 | 132 | .ws input[type="submit"], .nws input[type="submit"], button { 133 | border: none; 134 | border-radius: 2px; 135 | position: relative; 136 | height: 28px; 137 | min-width: 64px; 138 | display: inline-block; 139 | text-transform: uppercase; 140 | outline: none; 141 | cursor: pointer; 142 | background: rgb(83, 109, 254); 143 | color: #fff; 144 | font-size: 14px; 145 | font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif; 146 | line-height: 28px; 147 | margin-left: 8px; 148 | } 149 | 150 | .nws input[type="submit"], .nws button { 151 | background: rgb(244, 67, 54); 152 | } 153 | 154 | #qrCaptchaContainerAlt { 155 | margin-bottom: 8px; 156 | } 157 | 158 | #postForm input[type="text"] { 159 | margin: 4px 0; 160 | } 161 | 162 | #postForm td:first-child { 163 | text-align: right; 164 | padding-right: 10px; 165 | } 166 | 167 | .ws textarea, .nws textarea { 168 | border: 0 !important; 169 | } 170 | 171 | .ws textarea:focus, .nws textarea:focus { 172 | border: 0 !important; 173 | } 174 | 175 | table#postForm td { 176 | background: transparent; 177 | border: 0; 178 | font-weight: normal; 179 | } 180 | 181 | #toggleMsgBtn { 182 | margin-left: 5px !important; 183 | } 184 | 185 | .rules { 186 | text-align: center; 187 | } 188 | 189 | #qrHeader { 190 | background: #676767 !important; 191 | color: #fff !important; 192 | } 193 | 194 | #qrHeader a { 195 | color: #fff !important; 196 | } 197 | 198 | #search-box { 199 | height: inherit; 200 | line-height: inherit; 201 | margin: 0; 202 | padding: inherit; 203 | } 204 | 205 | #ctrl-top { 206 | padding-bottom: 10px; 207 | border-top: 1px solid #ddd; 208 | padding-top: 10px; 209 | text-align: center; 210 | } 211 | 212 | .reply:target, .reply.highlight { 213 | background: #eee !important; 214 | padding: 10px !important; 215 | border: 0 !important; 216 | } 217 | 218 | .navLinks + hr, .open-qr-wrap, .board hr, #bannerCnt, #ctrl-top + hr, #ctrl-top > hr { 219 | display: none; 220 | } 221 | 222 | .navLinks { 223 | padding-bottom: 8px; 224 | color: transparent; 225 | width: 80%; 226 | margin: auto; 227 | } 228 | 229 | .navLinks label { 230 | color: rgb(83, 109, 254); 231 | } 232 | 233 | .navLinks label + span { 234 | color: #000; 235 | } 236 | 237 | .navLinksBot { 238 | margin-top: 30px; 239 | text-align: left; 240 | } 241 | 242 | div#boardNavDesktop, div#boardNavDesktopFoot, div#boardNavMobile { 243 | background: #fff; 244 | padding: 5px 10px; 245 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.06), 0 1px 5px 0 rgba(0, 0, 0, 0.04); 246 | margin-bottom: 25px; 247 | color: transparent; 248 | font-size: 14px; 249 | } 250 | 251 | div#boardNavMobile { 252 | color: #000; 253 | border: 0; 254 | } 255 | 256 | div#boardNavDesktopFoot { 257 | margin-bottom: 0; 258 | margin-top: 25px; 259 | padding-top: 25px; 260 | padding-bottom: 25px; 261 | } 262 | 263 | div#boardNavDesktop a, div#boardNavDesktopFoot a { 264 | margin-left: -3px; 265 | margin-right: -3px; 266 | padding: 0; 267 | } 268 | 269 | .persistentNav .pageJump a { 270 | margin: 0; 271 | padding-right: 5px; 272 | } 273 | 274 | div.pagelist { 275 | background: #fff; 276 | margin-top: 25px; 277 | margin-bottom: 25px; 278 | border: 0; 279 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); 280 | margin-left: 25px; 281 | padding: 8px; 282 | border-radius: 2px; 283 | } 284 | 285 | div#absbot { 286 | background: #fff; 287 | color: #999; 288 | } 289 | 290 | div#absbot #footer-links a { 291 | text-decoration: none !important; 292 | color: rgb(83, 109, 254) !important; 293 | } 294 | 295 | div#absbot #footer-links a:hover { 296 | text-decoration: underline !important; 297 | } 298 | 299 | .bottomCtrl { 300 | display: none; 301 | } 302 | 303 | .ad-plea-bottom + hr { 304 | display: none; 305 | } 306 | 307 | div#boardNavDesktopFoot { 308 | margin-bottom: 0; 309 | } 310 | 311 | div.post, .extPanel, div.reply, .dd-menu ul { 312 | background: #fff; 313 | border-radius: 2px; 314 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); 315 | border: none; 316 | } 317 | 318 | div.pagelist div.cataloglink { 319 | border: 0; 320 | } 321 | 322 | div.post { 323 | max-width: 75%; 324 | margin: 0; 325 | padding: 10px; 326 | } 327 | 328 | .dd-menu li { 329 | padding: 6px 10px !important; 330 | border: 0 !important; 331 | } 332 | 333 | .dd-menu li:hover { 334 | background-color: #eee !important; 335 | } 336 | 337 | #quote-preview { 338 | border: 0 !important; 339 | padding: 10px !important; 340 | } 341 | 342 | div.op { 343 | display: block; 344 | max-width: none; 345 | } 346 | 347 | .fileText { 348 | color: #999; 349 | font-size: 12px; 350 | margin-top: 2px; 351 | } 352 | 353 | .op .fileText { 354 | margin-top: -5px; 355 | margin-bottom: 5px; 356 | } 357 | 358 | .fileText a { 359 | color: #999 !important; 360 | text-decoration: none; 361 | } 362 | 363 | .posteruid, .dateTime { 364 | color: #999; 365 | } 366 | 367 | .postInfo input[type="checkbox"] { 368 | display: none; 369 | } 370 | 371 | div.sideArrows { 372 | display: none; 373 | } 374 | 375 | hr { 376 | border: 0; 377 | border-bottom: 1px solid #ddd; 378 | } 379 | 380 | div.post:after { 381 | display: block; 382 | content: ' '; 383 | clear: both; 384 | } 385 | 386 | div.post div.file .fileThumb img { 387 | object-fit: cover; 388 | } 389 | 390 | div.reply div.file .fileThumb img:not(.expanded-thumb) { 391 | border-radius: 75px; 392 | width: 75px !important; 393 | height: 75px !important; 394 | } 395 | 396 | div.op div.file .fileThumb img:not(.expanded-thumb) { 397 | border-radius: 150px; 398 | width: 150px !important; 399 | height: 150px !important; 400 | } 401 | 402 | .postMessage { 403 | margin-left: 20px; 404 | margin-top: 5px; 405 | } 406 | 407 | #boardNavDesktop::after { 408 | content: ' '; 409 | display: block; 410 | clear: both; 411 | } 412 | 413 | span.summary { 414 | border-radius: 0 0 2px 2px; 415 | background-color: #f5f5f5; 416 | width: 80%; 417 | display: block; 418 | margin: -1px auto 0 auto; 419 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); 420 | border-top: 1px solid rgba(0, 0, 0, 0.1); 421 | text-indent: 10px; 422 | padding: 10px 0; 423 | } -------------------------------------------------------------------------------- /javascripts/frontpage.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var $ = {}; 4 | 5 | $.id = function(id) { 6 | return document.getElementById(id); 7 | }; 8 | 9 | $.el = function(tag) { 10 | return document.createElement(tag); 11 | }; 12 | 13 | $.on = function(n, e, h) { 14 | n.addEventListener(e, h, false); 15 | }; 16 | 17 | $.off = function(n, e, h) { 18 | n.removeEventListener(e, h, false); 19 | }; 20 | 21 | $.setCookie = function(name, value) { 22 | var date = new Date(); 23 | 24 | date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); 25 | 26 | document.cookie = name + '=' + value 27 | + '; expires=' + date.toGMTString() 28 | + '; path=/'; 29 | }; 30 | 31 | $.removeCookie = function(name) { 32 | document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/'; 33 | }; 34 | 35 | $.getCookie = function(name) { 36 | var i, c, ca, key; 37 | 38 | key = name + '='; 39 | ca = document.cookie.split(';'); 40 | 41 | for (i = 0; c = ca[i]; ++i) { 42 | while (c.charAt(0) == ' ') { 43 | c = c.substring(1, c.length); 44 | } 45 | if (c.indexOf(key) === 0) { 46 | return decodeURIComponent(c.substring(key.length, c.length)); 47 | } 48 | } 49 | 50 | return null; 51 | }; 52 | 53 | /* *** */ 54 | 55 | var APP = { 56 | init: function() { 57 | this.xhr = null; 58 | 59 | this.clickCommands = { 60 | 'filter': APP.onFilterClick, 61 | 'opts': APP.onOptionsClick, 62 | 'set': APP.onMenuItemClick, 63 | 'x-wot': APP.onCloseWotClick, 64 | 'x-disc': APP.onCloseDiscClick, 65 | 'ok-disc': APP.onOkDiscClick 66 | }; 67 | 68 | this.is_4channel = window.location.host !== 'www.4chan.org'; 69 | 70 | $.on(document, 'DOMContentLoaded', APP.run); 71 | $.on(document, 'click', APP.onClick); 72 | }, 73 | 74 | run: function() { 75 | var el; 76 | 77 | $.off(document, 'DOMContentLoaded', APP.run); 78 | 79 | if (window == top && window.Opts['4chan_frames']) { 80 | window.location.href = '/frames'; 81 | return; 82 | } 83 | 84 | if (el = $.id('wot-cnt')) { 85 | el.innerHTML = APP.wotContent; 86 | } 87 | 88 | if (!$.getCookie('4chan_disclaimer')) { 89 | $.on(document, 'click', APP.onClickDisclaimer); 90 | } 91 | }, 92 | 93 | onClick: function(e) { 94 | var t, cmd; 95 | 96 | if (e.which != 1 || e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) { 97 | return; 98 | } 99 | 100 | if ((t = e.target) == document) { 101 | return; 102 | } 103 | 104 | if ((cmd = t.getAttribute('data-cmd')) && (cmd = APP.clickCommands[cmd])) { 105 | e.stopPropagation(); 106 | cmd(t, e); 107 | } 108 | }, 109 | 110 | onClickDisclaimer: function(e) { 111 | var t; 112 | 113 | if ((t = e.target) == document) { 114 | return; 115 | } 116 | 117 | if (t.className == 'c-thumb') { 118 | t = t.parentNode; 119 | } 120 | 121 | if (t.href && /boards\.(4chan|4channel)\.org/.test(t.href)) { 122 | e.preventDefault(); 123 | APP.showDisclaimer(t.getAttribute('href')); 124 | } 125 | }, 126 | 127 | showDisclaimer: function(url) { 128 | var el; 129 | 130 | el = $.el('div'); 131 | el.id = 'backdrop'; 132 | document.body.appendChild(el); 133 | 134 | el = $.el('div'); 135 | el.id = 'disclaimer-dialog'; 136 | el.innerHTML = '

Disclaimer

' 137 | + '
' 138 | + '
' + APP.discContent 139 | + ''; 143 | 144 | el.style.top = (window.pageYOffset + 50) + 'px'; 145 | 146 | document.body.appendChild(el); 147 | }, 148 | 149 | onCloseDiscClick: function() { 150 | var el; 151 | 152 | if (el = $.id('disclaimer-dialog')) { 153 | el.parentNode.removeChild(el); 154 | } 155 | 156 | if (el = $.id('backdrop')) { 157 | el.parentNode.removeChild(el); 158 | } 159 | }, 160 | 161 | onOkDiscClick: function(btn) { 162 | var url; 163 | 164 | url = btn.getAttribute('data-url'); 165 | 166 | if (url) { 167 | $.setCookie('4chan_disclaimer', 1); 168 | window.location = url; 169 | } 170 | }, 171 | 172 | showMenu: function(html, btn) { 173 | var el, aabb, aabb2; 174 | 175 | APP.closeMenu(); 176 | 177 | el = $.el('div'); 178 | el.id = 'fp-menu'; 179 | el.innerHTML = html; 180 | 181 | document.body.appendChild(el); 182 | 183 | aabb = btn.getBoundingClientRect(); 184 | aabb2 = el.getBoundingClientRect(); 185 | 186 | el.style.top = (aabb.top + window.pageYOffset + aabb.height + 5) + 'px'; 187 | 188 | el.style.left = (aabb.left - aabb2.width + aabb.width - 5) + 'px'; 189 | 190 | $.on(document, 'click', APP.closeMenu); 191 | }, 192 | 193 | closeMenu: function() { 194 | var el; 195 | 196 | $.off(document, 'click', APP.closeMenu); 197 | 198 | if (el = $.id('fp-menu')) { 199 | el.parentNode.removeChild(el); 200 | } 201 | }, 202 | 203 | onFilterClick: function(btn) { 204 | var html, opts; 205 | 206 | opts = window.Opts; 207 | 208 | if (APP.is_4channel) { 209 | html = '
    '; 210 | } 211 | else { 212 | html = '
      ' 213 | + '
    • Show All Boards
    • ' 215 | + '
    • Show NSFW Boards Only
    • ' 217 | + '
    • Show Worksafe Boards Only
    • ' 219 | + '
    • Show All Boards (Classic)
    • ' 221 | + '
    • '; 222 | } 223 | 224 | html += '
    • Use Frames
    • ' 226 | + '
    • Use Catalog
    • ' 228 | + '
    '; 229 | 230 | APP.showMenu(html, btn); 231 | }, 232 | 233 | onOptionsClick: function(btn) { 234 | var html, opts; 235 | 236 | opts = window.Opts; 237 | 238 | html = '
      ' 239 | + '
    • Show Worksafe Content Only
    • ' 241 | + '
    • Show NSFW Content Only
    • ' 243 | + '
    • Show All Content
    • ' 245 | + '
    '; 246 | 247 | APP.showMenu(html, btn); 248 | }, 249 | 250 | onMenuItemClick: function(btn) { 251 | var opt, val; 252 | 253 | opt = btn.getAttribute('data-opt'); 254 | val = btn.getAttribute('data-val'); 255 | 256 | if (!val && window.Opts[opt]) { 257 | $.removeCookie(opt); 258 | } 259 | else { 260 | $.setCookie(opt, val || 1); 261 | } 262 | 263 | if (opt == '4chan_frames') { 264 | if (window.Opts[opt]) { 265 | window.parent.location.href = '/'; 266 | } 267 | else { 268 | location.href = '/frames'; 269 | } 270 | } 271 | else { 272 | location.href = location.href; 273 | } 274 | }, 275 | 276 | onCloseWotClick: function(btn, e) { 277 | var el; 278 | 279 | e.preventDefault(); 280 | 281 | if (el = $.id('announce')) { 282 | el.parentNode.removeChild(el); 283 | } 284 | 285 | $.setCookie('wi4c', 1); 286 | }, 287 | 288 | wotContent: '

    4chan is a simple image-based bulletin board where anyone can post comments and share images. There are boards dedicated to a variety of topics, from Japanese animation and culture to videogames, music, and photography. Users do not need to register an account before participating in the community. Feel free to click on a board below that interests you and jump right in!


    Be sure to familiarize yourself with the Rules before posting, and read the FAQ if you wish to learn more about how to use the site.

    ', 289 | 290 | discContent: '

    To access this section of 4chan (the "website"), you understand and agree to the following:

    1. The content of this website is for mature audiences only and may not be suitable for minors. If you are a minor or it is illegal for you to access mature images and language, do not proceed.

    2. This website is presented to you AS IS, with no warranty, express or implied. By clicking "I Agree," you agree not to hold 4chan responsible for any damages from your use of the website, and you understand that the content posted is not owned or generated by 4chan, but rather by 4chan\'s users.

    3. As a condition of using this website, you agree to comply with the "Rules" of 4chan, which are also linked on the home page. Please read the Rules carefully, because they are important.
    ' 291 | }; 292 | 293 | APP.init(); 294 | -------------------------------------------------------------------------------- /javascripts/bans.js: -------------------------------------------------------------------------------- 1 | var Parser = {} 2 | 3 | Parser.init = function() { 4 | var staticPath = '//s.4cdn.org/image/'; 5 | 6 | var tail = window.devicePixelRatio >= 2 ? '@2x.gif' : '.gif'; 7 | 8 | this.icons = { 9 | admin: staticPath + 'adminicon' + tail, 10 | mod: staticPath + 'modicon' + tail, 11 | dev: staticPath + 'developericon' + tail, 12 | del: staticPath + 'filedeleted-res' + tail 13 | }; 14 | }; 15 | 16 | function buildHTMLFromJSON(data) { 17 | var 18 | container = document.createElement('div'), 19 | isOP = false, 20 | 21 | userId, 22 | fileDims = '', 23 | imgSrc = '', 24 | fileBuildStart = '', 25 | fileBuildEnd = '', 26 | fileInfo = '', 27 | fileHtml = '', 28 | fileThumb, 29 | fileSize = '', 30 | fileClass = '', 31 | shortFile = '', 32 | longFile = '', 33 | tripcode = '', 34 | capcodeStart = '', 35 | capcodeClass = '', 36 | capcode = '', 37 | flag, 38 | highlight = '', 39 | emailStart = '', 40 | emailEnd = '', 41 | name, 42 | subject, 43 | noLink, 44 | quoteLink, 45 | noFilename, 46 | maxSize = 150, 47 | ratio, imgWidth, imgHeight, 48 | 49 | imgDir = '//i.4cdn.org/' + data.board + '/src'; 50 | 51 | noLink = 'res/' + data.resto + '#p' + data.no; 52 | quoteLink = 'res/' + data.resto + '#q' + data.no; 53 | 54 | if (!data.capcode && data.id) { 55 | userId = ' (ID: ' 57 | + data.id + ') '; 58 | } 59 | else { 60 | userId = ''; 61 | } 62 | 63 | switch (data.capcode) { 64 | case 'admin_highlight': 65 | highlight = ' highlightPost'; 66 | case 'admin': 67 | capcodeStart = ' ## Admin'; 69 | capcodeClass = ' capcodeAdmin'; 70 | 71 | capcode = ' '; 74 | break; 75 | case 'mod': 76 | capcodeStart = ' ## Mod'; 78 | capcodeClass = ' capcodeMod'; 79 | 80 | capcode = ' '; 83 | break; 84 | case 'developer': 85 | capcodeStart = ' ## Developer'; 87 | capcodeClass = ' capcodeDeveloper'; 88 | 89 | capcode = ' '; 92 | break; 93 | } 94 | 95 | if (data.email) { 96 | emailStart = ''; 97 | emailEnd = ''; 98 | } 99 | 100 | if (data.country) { 101 | flag = ' '
104 |       + data.country + ''; 105 | } 106 | else { 107 | flag = ''; 108 | } 109 | 110 | if (data.ext) { 111 | shortFile = longFile = data.filename + data.ext; 112 | if (data.filename.length > 30) { 113 | shortFile = data.filename.slice(0, 25) + '(...)' + data.ext; 114 | } 115 | 116 | if (!data.tn_w && !data.tn_h && data.ext == '.gif') { 117 | data.tn_w = data.w; 118 | data.tn_h = data.h; 119 | } 120 | if (data.fsize >= 1048576) { 121 | fileSize = ((0 | (data.fsize / 1048576 * 100 + 0.5)) / 100) + ' M'; 122 | } 123 | else if (data.fsize > 1024) { 124 | fileSize = (0 | (data.fsize / 1024 + 0.5)) + ' K'; 125 | } 126 | else { 127 | fileSize = data.fsize + ' '; 128 | } 129 | 130 | fileThumb = '//i.4cdn.org/bans/thumb/' + data.board + '/' + data.thumb + 's.jpg'; 131 | 132 | imgWidth = data.tn_w; 133 | imgHeight = data.tn_h; 134 | 135 | if (imgWidth > maxSize) { 136 | ratio = maxSize / imgWidth; 137 | imgWidth = maxSize; 138 | imgHeight = imgHeight * ratio; 139 | } 140 | if (imgHeight > maxSize) { 141 | ratio = maxSize / imgHeight; 142 | imgWidth = imgWidth * ratio; 143 | imgHeight = maxSize; 144 | } 145 | 146 | imgSrc = '' 147 | + '' + fileSize + 'B'; 151 | 152 | fileDims = data.ext == '.pdf' ? 'PDF' : data.w + 'x' + data.h; 153 | fileInfo = 'File: ' + data.tim + data.ext + '-(' + fileSize 156 | + 'B, ' + fileDims 157 | + (noFilename ? '' : (', ' 158 | + shortFile + '')) + ')'; 159 | 160 | fileBuildStart = fileInfo ? '
    ' : ''; 161 | fileBuildEnd = fileInfo ? '
    ' : ''; 162 | 163 | fileHtml = '
    ' 164 | + fileBuildStart + fileInfo + fileBuildEnd + imgSrc + '
    '; 165 | } 166 | else if (data.filedeleted) { 167 | fileHtml = '
    File deleted.
    '; 169 | } 170 | 171 | if (data.trip) { 172 | tripcode = ' ' + data.trip + ''; 173 | } 174 | 175 | name = data.name || ''; 176 | 177 | subject = data.sub || ''; 178 | 179 | container.id = 'p' + data.no; 180 | container.className = 'post reply' + highlight + (data.nsfw ? ' nws' : ' ws'); 181 | container.innerHTML = 182 | '' + fileHtml + 194 | '
    ' 195 | + (data.com || '') + '
    '; 196 | 197 | return container; 198 | } 199 | 200 | function showPreview(e) { 201 | var rect, postHeight, doc, docWidth, style, pos, top, scrollTop, link, post, bid; 202 | 203 | link = e.target; 204 | 205 | if (!(bid = e.target.getAttribute('data-pid'))) { 206 | return; 207 | } 208 | 209 | post = buildHTMLFromJSON(window.postPreviews[bid]); 210 | 211 | post.id = 'quote-preview'; 212 | 213 | rect = link.getBoundingClientRect(); 214 | doc = document.documentElement; 215 | docWidth = doc.offsetWidth; 216 | style = post.style; 217 | 218 | document.body.appendChild(post); 219 | 220 | if ((docWidth - rect.right) < (0 | (docWidth * 0.3))) { 221 | pos = docWidth - rect.left; 222 | style.right = pos + 5 + 'px'; 223 | } 224 | else { 225 | pos = rect.left + rect.width; 226 | style.left = pos + 5 + 'px'; 227 | } 228 | 229 | top = rect.top + link.offsetHeight + window.pageYOffset 230 | - post.offsetHeight / 2 - rect.height / 2; 231 | 232 | postHeight = post.getBoundingClientRect().height; 233 | 234 | if (doc.scrollTop != document.body.scrollTop) { 235 | scrollTop = doc.scrollTop + document.body.scrollTop; 236 | } else { 237 | scrollTop = document.body.scrollTop; 238 | } 239 | 240 | if (top < scrollTop) { 241 | style.top = scrollTop + 'px'; 242 | } 243 | else if (top + postHeight > scrollTop + doc.clientHeight) { 244 | style.top = scrollTop + doc.clientHeight - postHeight + 'px'; 245 | } 246 | else { 247 | style.top = top + 'px'; 248 | } 249 | } 250 | 251 | function removePreview() { 252 | if (cnt = document.getElementById('quote-preview')) { 253 | document.body.removeChild(cnt); 254 | } 255 | } 256 | 257 | function ago(timestamp) { 258 | var delta, count, head, tail, ago; 259 | 260 | delta = Date.now() / 1000 - timestamp; 261 | 262 | if (delta < 1) { 263 | return 'moments ago'; 264 | } 265 | 266 | if (delta < 60) { 267 | return (0 | delta) + ' seconds ago'; 268 | } 269 | 270 | if (delta < 3600) { 271 | count = 0 | (delta / 60); 272 | 273 | if (count > 1) { 274 | return count + ' minutes ago'; 275 | } 276 | else { 277 | return 'one minute ago'; 278 | } 279 | } 280 | 281 | if (delta < 86400) { 282 | count = 0 | (delta / 3600); 283 | 284 | if (count > 1) { 285 | head = count + ' hours'; 286 | } 287 | else { 288 | head = 'one hour'; 289 | } 290 | 291 | tail = 0 | (delta / 60 - count * 60); 292 | 293 | if (tail > 1) { 294 | head += ' and ' + tail + ' minutes'; 295 | } 296 | 297 | return head + ' ago'; 298 | } 299 | 300 | count = 0 | (delta / 86400); 301 | 302 | if (count > 1) { 303 | head = count + ' days'; 304 | } 305 | else { 306 | head = 'one day'; 307 | } 308 | 309 | tail = 0 | (delta / 3600 - count * 24); 310 | 311 | if (tail > 1) { 312 | head += ' and ' + tail + ' hours'; 313 | } 314 | 315 | return head + ' ago'; 316 | }; 317 | 318 | function initTimestamps() { 319 | var i, n, nodes; 320 | 321 | nodes = document.getElementsByClassName('time'); 322 | 323 | for (i = 0; n = nodes[i]; ++i) { 324 | n.textContent = ago(+n.getAttribute('data-utc')); 325 | } 326 | } 327 | 328 | function run() { 329 | Parser.init(); 330 | initTimestamps(); 331 | document.addEventListener('mouseover', showPreview, false); 332 | document.addEventListener('mouseout', removePreview, false); 333 | } 334 | 335 | document.addEventListener('DOMContentLoaded', run, false); 336 | 337 | if (/(^|\.)4channel\.org/.test(location.host)) { 338 | location = location.protocol + '//www.4chan.org/bans' 339 | } -------------------------------------------------------------------------------- /css/global.css: -------------------------------------------------------------------------------- 1 | #boards .column { 2 | float: left; 3 | width: 12em; 4 | } 5 | 6 | #logo-fp { 7 | font-size: 1px; 8 | line-height: 0; 9 | overflow: hidden; 10 | margin: 0 auto; 11 | } 12 | 13 | #logo-fp img { 14 | margin: auto; 15 | display: block; 16 | border: none; 17 | } 18 | 19 | @media all and (max-device-width: 640px) { 20 | .center iframe, #logo-fp img { 21 | height: auto; 22 | max-width: 100%; 23 | } 24 | 25 | 26 | } 27 | 28 | #logo { 29 | background: url('/image/fp/logo.png') left top no-repeat; 30 | font-size: 1px; 31 | line-height: 0; 32 | height: 120px; 33 | overflow: hidden; 34 | margin: 0 auto; 35 | width: 300px; 36 | } 37 | 38 | #logo h1 { 39 | margin-left: -200px; 40 | width: 100%; 41 | height: 100%; 42 | display: block; 43 | } 44 | 45 | #logo h1 a { 46 | width: 100%; 47 | height: 100%; 48 | display: block; 49 | padding-right: 150px; 50 | } 51 | 52 | #logo h2 { 53 | margin-left: -200px; 54 | } 55 | 56 | #whatis { 57 | margin-top: 1.75em; 58 | text-align: center; 59 | } 60 | 61 | #hd { 62 | margin-bottom: 0; 63 | } 64 | 65 | br.clear-bug { 66 | height: 0; 67 | line-height: 0; 68 | clear: both; 69 | } 70 | 71 | .box-outer { 72 | border: 1px solid; 73 | zoom: 100%; 74 | margin-bottom: .5em; 75 | padding-bottom: .5em; 76 | } 77 | 78 | .boxbar { 79 | padding-left: .5em; 80 | line-height: 2em; 81 | } 82 | 83 | .boxcontent { 84 | padding: .5em; 85 | padding-top: .25em; 86 | padding-bottom: 0; 87 | line-height: 130%; 88 | } 89 | 90 | #disclaimer-dialog { 91 | border: 1px solid; 92 | text-align: left; 93 | } 94 | 95 | #disclaimer-dialog .hd { 96 | border: none; 97 | padding: 0; 98 | padding-left: .5em; 99 | line-height: 2em; 100 | } 101 | 102 | #disclaimer-dialog li { 103 | display: list-item; 104 | list-style: decimalinside; 105 | } 106 | 107 | #disclaimer-dialog .container-close, .closebutton { 108 | width: 16px; 109 | height: 16px; 110 | } 111 | 112 | #recent-images .boxcontent { 113 | text-align: center; 114 | } 115 | 116 | #recent-images li { 117 | margin: auto; 118 | margin-bottom: .5em; 119 | display: block; 120 | width: 250px; 121 | padding: 1px; 122 | } 123 | 124 | #recent-images a { 125 | display: block; 126 | } 127 | 128 | #recent-images img { 129 | display: block; 130 | margin: auto; 131 | max-width: 250px; 132 | } 133 | 134 | #ft ul { 135 | margin: 0; 136 | width: 750px; 137 | } 138 | 139 | #ft li { 140 | display: block; 141 | float: left; 142 | border: 1px solid; 143 | padding-left: 1em; 144 | padding-right: 1em; 145 | padding-bottom: 2px; 146 | border-left: none; 147 | margin-top: -1px; 148 | padding-top: 2px; 149 | } 150 | 151 | #ft li.first { 152 | border-left: 1px solid; 153 | } 154 | 155 | #ft li.current { 156 | padding-bottom: 4px; 157 | border-top: none; 158 | } 159 | 160 | #ft li.fill { 161 | border: 0; 162 | padding-bottom: 4px; 163 | border-top: 1px solid; 164 | width: 68px; 165 | } 166 | 167 | #ft { 168 | text-align: center; 169 | } 170 | 171 | #ft ul { 172 | display: inline-block; 173 | } 174 | 175 | #ft ul { 176 | display: inline; 177 | } 178 | 179 | #ft ul { 180 | display: table; 181 | margin: auto; 182 | } 183 | 184 | #copyright { 185 | text-align: center; 186 | margin-top: 1em; 187 | margin-bottom: 1em; 188 | } 189 | 190 | .boxbar { 191 | position: relative; 192 | zoom: 100%; 193 | } 194 | 195 | .menubutton, .closebutton { 196 | position: absolute; 197 | top: 0; 198 | right: 0; 199 | margin-right: .25em; 200 | } 201 | 202 | .closebutton { 203 | margin-top: 3px; 204 | margin-right: 4px; 205 | } 206 | 207 | .menubutton a { 208 | padding: 2px; 209 | padding-right: 18px; 210 | } 211 | 212 | .menubutton { 213 | background: right center no-repeat; 214 | } 215 | 216 | #preview-tooltip-ws, #preview-tooltip-nws { 217 | text-align: left; 218 | } 219 | 220 | #preview-tooltip-ws .post, #preview-tooltip-nws .post { 221 | max-width: 500px; 222 | *width: 500px; 223 | } 224 | 225 | #preview-tooltip-nws .post .p_filetitle { 226 | font-weight: bold; 227 | color: #cc1105; 228 | } 229 | 230 | #preview-tooltip-ws .post .p_filetitle { 231 | font-weight: bold; 232 | color: #0f0c5d; 233 | } 234 | 235 | #preview-tooltip-ws .post .p_postername, #preview-tooltip-nws .post .p_postername { 236 | font-weight: bold; 237 | color: #117743; 238 | } 239 | 240 | #preview-tooltip-ws .post .postertrip, #preview-tooltip-nws .post .postertrip { 241 | color: #228854; 242 | } 243 | 244 | #preview-tooltip-ws blockquote, #preview-tooltip-nws blockquote { 245 | margin-top: 10px; 246 | } 247 | 248 | #preview-tooltip-nws blockquote a { 249 | color: #000080; 250 | } 251 | 252 | #preview-tooltip-ws blockquote a { 253 | color: #d00; 254 | } 255 | 256 | #preview-tooltip-ws .unkfunc, #preview-tooltip-nws .unkfunc { 257 | color: #789922; 258 | } 259 | 260 | #preview-tooltip-nws h2 { 261 | max-width: 500px; 262 | *width: 500px; 263 | background: #fca; 264 | color: #800; 265 | padding-left: .5em; 266 | height: 1.5em; 267 | line-height: 1.5em; 268 | font-size: 108%; 269 | } 270 | 271 | #preview-tooltip-ws h2 { 272 | max-width: 500px; 273 | *width: 500px; 274 | background: #59a; 275 | color: #fff; 276 | padding-left: .5em; 277 | height: 1.5em; 278 | line-height: 1.5em; 279 | font-size: 108%; 280 | } 281 | 282 | #preview-tooltip-nws .post, #preview-tooltip-ws .post { 283 | padding: 3px; 284 | } 285 | 286 | #preview-tooltip-nws { 287 | background: #ffe; 288 | border-color: #800; 289 | padding: 0; 290 | } 291 | 292 | #preview-tooltip-ws { 293 | background: #eff; 294 | border-color: #006; 295 | padding: 0; 296 | } 297 | 298 | .boxcontent, #ft, #whatis { 299 | font-size: 93%; 300 | } 301 | 302 | .code { 303 | font-family: consolas, monospace; 304 | } 305 | 306 | h1 { 307 | font-family: Tahoma, Bitstream Vera Sans; 308 | font-size: 197%; 309 | font-weight: bold; 310 | } 311 | 312 | h2 { 313 | font-size: 131%; 314 | font-weight: bold; 315 | } 316 | 317 | h3 { 318 | font-size: 100%; 319 | font-weight: bold; 320 | } 321 | 322 | #copyright { 323 | font-size: 11px; 324 | } 325 | 326 | .menubutton li { 327 | font-size: inherit; 328 | } 329 | 330 | #announce .boxcontent { 331 | line-height: 1.5em; 332 | } 333 | 334 | #announce em { 335 | font-style: italic; 336 | } 337 | 338 | #announce strong { 339 | font-weight: bold; 340 | } 341 | 342 | h1 a { 343 | color: #800; 344 | text-decoration: none; 345 | } 346 | 347 | html { 348 | background: #ffe; 349 | } 350 | 351 | body { 352 | background: #ffe url('/image/fp/fade.png') top repeat-x; 353 | color: #800; 354 | } 355 | 356 | .boxbar { 357 | background: #fca; 358 | color: #800; 359 | } 360 | 361 | #announce .boxbar { 362 | background: #800; 363 | color: #fff; 364 | } 365 | 366 | #announce { 367 | background: #fff; 368 | color: #000; 369 | } 370 | 371 | #disclaimer-dialog .container-close, .closebutton { 372 | background: #800 url('/image/fp/icon-close-red.png'); 373 | } 374 | 375 | .top-box { 376 | background: #fff; 377 | } 378 | 379 | .top-box .menubutton { 380 | background-image: url('/image/fp/icon-down-peach.png'); 381 | } 382 | 383 | #boards a { 384 | color: #800; 385 | text-decoration: none; 386 | } 387 | 388 | #boards a:hover { 389 | color: #e00; 390 | text-decoration: underline; 391 | } 392 | 393 | .left-box { 394 | background: #efe; 395 | color: #060; 396 | } 397 | 398 | .left-box .boxbar { 399 | background: #9c6; 400 | color: #060; 401 | } 402 | 403 | #recent-images li { 404 | background: #120; 405 | } 406 | 407 | .right-box { 408 | background: #eff; 409 | color: #006; 410 | } 411 | 412 | .right-box .boxbar { 413 | background: #59a; 414 | color: #fff; 415 | } 416 | 417 | .right-box .menubutton { 418 | background-image: url('/image/fp/icon-down-teal.png'); 419 | } 420 | 421 | .right-box .list-alpha { 422 | margin-top: 0; 423 | margin-bottom: 0; 424 | } 425 | 426 | .right-box .list-alpha li { 427 | list-style-type: lower-alpha; 428 | } 429 | 430 | #ft ul { 431 | border-top: 1px solid; 432 | } 433 | 434 | #ft li { 435 | background: #fed; 436 | } 437 | 438 | #ft li a { 439 | color: #800; 440 | text-decoration: none; 441 | } 442 | 443 | #ft li a:hover { 444 | color: #c63; 445 | } 446 | 447 | #ft li.current, #ft li.fill { 448 | background: #ffe; 449 | color: #800; 450 | } 451 | 452 | #filter-container .yuimenuitem-selected { 453 | background-color: #fca; 454 | } 455 | 456 | #filter-container a:link, #filter-container a:visited, #filter-container a:hover { 457 | color: #800; 458 | text-decoration: none; 459 | } 460 | 461 | #filter-container a:hover { 462 | color: #c63; 463 | } 464 | 465 | #options-container .yuimenuitem-selected { 466 | background-color: #eff; 467 | } 468 | 469 | #options-container a:link, #options-container a:visited, #options-container a:hover { 470 | color: #800; 471 | text-decoration: none; 472 | } 473 | 474 | #options-container a:hover { 475 | color: #c63; 476 | } 477 | 478 | #disclaimer-dialog .hd { 479 | background: #800; 480 | color: #fff; 481 | } 482 | 483 | .warning { 484 | color: #e00; 485 | } 486 | 487 | a:visited { 488 | color: blue; 489 | } 490 | 491 | strong { 492 | font-weight: bold; 493 | } 494 | 495 | .center { 496 | text-align: center; 497 | } 498 | 499 | #c-threads { 500 | text-align: center; 501 | } 502 | 503 | .c-thread { 504 | vertical-align: top; 505 | display: inline-block; 506 | word-wrap: break-word; 507 | overflow: hidden; 508 | margin-top: 5px; 509 | padding: 5px 0 3px 0; 510 | position: relative; 511 | width: 175px; 512 | max-height: 320px; 513 | margin-bottom: 10px; 514 | } 515 | 516 | .c-board { 517 | font-weight: bold; 518 | overflow: hidden; 519 | text-overflow: ellipsis; 520 | display: block; 521 | white-space: nowrap; 522 | margin-bottom: 5px; 523 | } 524 | 525 | .c-thread img { 526 | border: 1px solid #800; 527 | display: inline; 528 | } 529 | 530 | .c-teaser { 531 | margin-bottom: 5px; 532 | padding: 0 2px; 533 | white-space: pre-line; 534 | } 535 | 536 | #site-stats .boxcontent { 537 | margin-top: 5px; 538 | text-align: center; 539 | } 540 | 541 | .stat-cell { 542 | display: inline-block; 543 | width: 33%; 544 | } 545 | 546 | #mobile-ad-top { 547 | display: none; 548 | } 549 | 550 | @media all and (max-device-width: 480px) { 551 | #mobile-ad-top { 552 | height: 50px; 553 | width: 320px; 554 | margin: 10px auto; 555 | display: block; 556 | } 557 | 558 | 559 | } 560 | 561 | @media all and (max-device-width: 640px) { 562 | .yui-g .yui-u, .yui-g .yui-u.first { 563 | float: none; 564 | width: auto; 565 | } 566 | 567 | #doc { 568 | min-width: 0; 569 | width: auto; 570 | padding: 10px; 571 | } 572 | 573 | #ft li.current, #ft li.fill { 574 | background: inherit; 575 | color: #800; 576 | } 577 | 578 | #ft ul { 579 | width: auto; 580 | border-top: none; 581 | line-height: 2; 582 | display: block; 583 | } 584 | 585 | #ft li { 586 | background: inherit; 587 | display: inline; 588 | float: none; 589 | border: none; 590 | white-space: nowrap; 591 | } 592 | 593 | #ft li.first { 594 | border-left: none; 595 | } 596 | 597 | #ft li.current { 598 | padding-bottom: 4px; 599 | border-top: none; 600 | } 601 | 602 | #ft li.fill { 603 | display: none; 604 | } 605 | 606 | #ft li a { 607 | color: blue; 608 | text-decoration: underline; 609 | } 610 | 611 | .boardlink { 612 | display: inline-block; 613 | font-size: 1.2em; 614 | padding: 5px 10px 5px 0; 615 | } 616 | 617 | #boards .column { 618 | margin-bottom: 25px; 619 | } 620 | 621 | #boards .column:nth-child(2n) { 622 | float: right; 623 | } 624 | 625 | 626 | } -------------------------------------------------------------------------------- /pages/home.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 4chan 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 |
    24 |
    25 |
    26 | 4chan 27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 |

    What is 4chan?

    34 | 35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | 71 |
    72 |
    73 |
    74 |

    Boards

    75 |
    filter ▼
    76 |
    77 |
    78 |
    79 |

    Japanese Culture

    80 | 92 |

    Video Games

    93 | 103 |
    104 |
    105 |

    Interests

    106 | 123 |
    124 |
    125 |

    Creative

    126 | 142 |
    143 |
    144 |

    Other

    145 | 157 |

    Misc.

    (NSFW)

    158 | 166 |
    167 |
    168 |

    Adult

    (NSFW)

    169 | 184 |
    185 |
    186 |
    187 |
    188 |
    189 |