forked from acidstout/dickbutt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdickbutt.js
35 lines (31 loc) · 5.19 KB
/
dickbutt.js
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
/**
* This will plaster a website with randomly sized and positioned dickbutts.
*
* Uses an inline SVG image in order to eliminate external references.
*
* @author nrekow
*/
(function () {
var dickbutts = 20; /* number of dickutts to draw */
var imgMinWidth = 48; /* minimum dickbut width */
var imgMaxWidth = 256; /* maximum dickbutt width */
/**
* Get document dimensions.
*/
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
/**
* Draw some lovely dickbutts.
*/
for (var i = 0; i < dickbutts; i++) {
var randW = Math.floor((Math.random() * imgMaxWidth) + imgMinWidth); /* image width */
var randX = Math.floor((Math.random() * w)); /* horizontal position */
var randY = Math.floor((Math.random() * h)); /* vertical position */
/* Make dickbutt appear inside viewport e.g. don't cut-off images. */
if (randX + randW >= w) {
randX -= randW;
}
/* the actual draw */
document.body.innerHTML += '<img style="position:absolute;min-width:'+imgMinWidth+'px;max-width:'+imgMaxWidth+'px;top:'+randY+'px;left:'+randX+'px; width:'+randW+'px;" src=\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1319" height="1600"><path d="M463 54c-14 2-30 6-46 13l-66 32-57 28h-14c-28 0-48 7-62 22-18 19-24 48-17 89l2 12-2 7c-4 13-24 49-32 58a2209 2209 0 0 0-70 151c-2 4-2 7-2 104a572 572 0 0 0 32 253c12 23 35 49 62 68l7 5-4 7-34 51c-7 8-15 17-17 17l-5-7-14-16c-27-27-53-42-60-34l-4 10c-3 10-3 26-1 38 4 17 10 41 13 48 10 26 30 55 46 68 9 8 10 8 17 3a1813 1813 0 0 0 136-138l3 1c3 3 24 13 34 17a578 578 0 0 0 109 30l-12 18c-6 7-6 7-20 4-23-7-40-8-48-3-10 6-11 14-6 40a204 204 0 0 0 72 119c12 6 19 2 39-23a199 199 0 0 0 33-58l2-5 18-42c9-21 10-24 15-32l4-9 5 2c32 9 64 15 84 15 15 0 20-1 36-9l15-6c17-5 56-33 100-73l10-8 3-3 3-6c3-5 3-5 6-4 17 5 48 8 65 7 29-2 42-13 47-37a47 47 0 0 0-20-50l-3-2 10-5c29-14 43-29 37-41-3-7-10-12-26-20-17-9-31-17-33-20-2-2-2-2 0-2l46-66c54-82 56-87 56-111 0-12 0-13-3-19-4-8-10-13-23-19-16-8-29-11-41-8-8 2-20 8-29 14-9 7-32 31-54 55a12469 12469 0 0 1-75 85l-5-5c-11-12-30-25-50-31-29-9-67-10-106-1a419 419 0 0 0-40 11l5-34c10-46 21-77 41-118 18-36 26-59 38-103a745 745 0 0 0 20-227c-4-20-8-34-14-40-4-4-25-22-37-30-25-19-48-30-73-36-10-2-36-2-46-1zm47 33c18 5 35 16 46 31 13 16 34 54 39 71 13 38 8 74-26 191-14 51-24 83-55 174-21 60-19 54-19 96 0 32 0 34 2 38s5 5 19 6l9 1v-11l2-12 28-10c31-8 70-8 97-1 18 6 37 15 50 25l7 5-11 11c-9 9-11 11-13 11-24-6-37-7-57-7a244 244 0 0 0-84 19l-2 2 3 5 9 7 6 3h19c27-1 50 0 61 1 35 4 60 15 79 34 21 22 33 52 33 85 0 15-2 25-6 34l-4 8c-1 3-3 5-33 29-47 38-70 50-93 53-12 1-24 0-55-4-31-5-48-6-59-6-10 1-13 2-13 6l-19 59c-24 62-43 95-56 95-4 0-12-6-18-13a240 240 0 0 1-35-84l6 3c13 8 29 15 33 16 4 0 6 0 10-2 8-4 15-13 26-32 4-10 9-18 19-30 4-6 4-8 5-12 0-5 0-6-3-9-6-7-23-13-57-21-74-16-104-27-147-54-48-30-69-52-90-91-30-55-44-140-39-231 3-50 8-95 14-108a66066 66066 0 0 0 61-137l80 15 26 5 118 21c20 4 52 7 64 7 10 0 17-2 17-5a2077 2077 0 0 0-288-75l7-23 8-22 7 1c11 3 28 6 37 6h8l-4 8c-4 7-4 8-4 13 1 5 1 7 4 9 8 9 22 11 57 11l26-1c21-4 26-12 17-23-7-8-16-15-22-15-4 0-5 2-4 10v7l-5 1h-13c-21 0-21-7 1-20 9-6 29-16 41-21 11-4 15-9 17-15 1-3 1-5-1-8l-5-7-4-2-6 3-12 5-6 2 1-8c3-16-5-41-21-68l-3-5 10-6 16-8c7-5 74-33 83-35 15-4 20-5 38-5 15 1 18 1 26 4zm-186 72c11 15 16 43 12 57-3 6-9 12-15 15-10 3-25 2-41-3l-7-2 7-3c19-9 32-22 37-38l2-18c0-14 1-15 5-8zm585 378c7 4 12 9 16 17 3 8 4 21 0 32-4 15-15 33-29 50l-82 86-17 17 22 14c14 8 33 15 42 15 5 0 13 4 17 8 10 10 8 23-2 28-10 4-28 3-48-3l-11-3 15 17c24 24 34 39 35 52 0 6 0 7-2 11-5 9-16 13-34 13-20 0-46-8-45-13l2-13c2-9 2-13 2-25-1-21-4-33-14-52-13-25-38-50-63-64l-6-3 9-7c23-20 61-55 88-82a517 517 0 0 0 84-98c5-2 13-1 21 3zM238 923l14 9c0 3-76 80-96 97-24 21-34 26-41 21-10-7-26-45-35-82-6-23-7-34-4-35 4-1 16 9 43 39 20 22 26 28 29 28 5 0 29-27 60-67l15-19 15 9z"/><path d="M478 199c-18 2-31 11-44 26-12 15-22 43-25 66-1 4-1 6 1 8l6 10c5 9 9 14 13 16l18 6c44 15 72 17 92 7 9-4 20-16 30-31 12-18 16-28 16-42 0-31-29-55-78-64-14-2-21-3-29-2zm52 25c3 2 10 12 15 22 18 36 15 65-8 72-14 4-34 2-64-8-11-3-11-4 0-4 27-2 47-12 55-29 2-5 3-6 3-18 0-10-1-15-3-23-2-9-2-13 0-13l2 1zM416 477l-11 8-5 4-5 22c-30 147-38 182-49 198-4 6-19 20-35 33l-12 11c-4 7-3 16 2 21 4 4 13 8 21 9l8 1 4 10c6 11 13 19 19 21 4 2 12 1 16-1 6-4 17-16 23-27l2-4 5 5c9 10 15 13 21 10 4-2 11-12 19-25 3-6 3-8 3-12-1-7-6-16-19-32l-12-18c-2-5 1-12 37-97 13-29 24-58 29-72 10-30 5-47-13-46-7 1-9 2-11 10a947 947 0 0 1-25 80c-2 9-6 20-9 26-24 52-28 66-28 87a42 42 0 0 0 13 34c8 9 15 19 16 24 3 8 2 13-4 18l-4 4-6-9c-12-17-20-23-27-19-2 2-4 7-8 18-4 16-8 23-13 22-4-1-6-6-7-16-1-6-1-9-3-10-2-3-2-3-21-2-7 0-9 0-12-2-10-5 0-14 30-26l14-5 7-23 48-156c15-53 17-72 9-75-3-1-2-1-7 1zm168 194c-3 0-3 2-1 8 4 13 10 23 17 25 6 3 13 0 18-6 7-8 1-18-15-25-5-3-12-4-19-2zm30 114c-5 4-13 14-15 19-2 3 0 7 5 9 4 2 17 5 23 5h4v-13c-1-11-1-13-3-18-2-4-3-5-6-5s-5 1-8 3zm-50 59l-14 12c-2 6-1 20 3 24s9 2 20-7c6-5 8-9 8-16 0-13-7-18-17-13zm-6 52c-3 2-4 10-2 16 3 7 12 11 21 8 5-1 10-6 10-9 0-4-4-9-12-12-9-5-14-6-17-3zm29 49c-1 0-3 2-3 4-2 3-2 3 0 8 7 16 18 21 21 10 2-8-1-20-7-23-4-1-8-1-11 1z"/></svg>\' alt=""/>';
}
}());