My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
title="Sloganizer"
author="Jonathan Hefner"
description="Just Sloganizer it!"
render_inline="optional"
scaling="false"
width="400"
height="150"
scrolling="false"
/>

<Content type="html"><![CDATA[
<script type="text/javascript">
var slogans = [
"Let your {0} do the walking.",
"Reach out and touch {0}.",
"{0} is good for you.",
"You're in good hands with {0}.",
"Up, up and away with {0}.",
"Feel it - {0}!",
"The gods made {0}.",
"A little {0}'ll do ya.",
"It's {0} time!",
"When you got {0}, flaunt it.",
"M'm! M'm! {0}!",
"The {0} never sleeps.",
"Say it with {0}.",
"Got {0}?",
"It's a {0}. Honest.",
"Don't leave home without {0}.",
"Think {0}.",
"Ah, {0}!",
"{0}, take me away.",
"I'd walk a mile for a {0}.",
"Please don't squeeze the {0}.",
"The {0} that refreshes.",
"A {0} is forever.",
"Say no to no {0}.",
"If you want to get ahead, get a {0}.",
"We answer to a higher {0}.",
"Nothing runs like a {0}.",
"The {0} that melts in your mouth, not in your hand.",
"A {0} a day helps you work, rest and play.",
"The future's bright. The future's {0}.",
"Sometimes you feel like a {0}, sometimes you don't.",
"You know when you've been {0}'d.",
"Where's the {0}?",
"Think. Feel. {0}.",
"{0} will do anything for you.",
"Be inspired by {0}.",
"{0}, better than sex.",
"{0}rific.",
"There's lots of fun in {0}."
];

function sloganize()
{
var text = document.getElementById("subject").value;
if (/\S/.test(text))
{
var i = Math.floor(Math.random() * (slogans.length - 1));
var el = document.getElementById("result");
el.innerHTML = slogans[i].replace("{0}", text);
el.style.display = "block";
}
}
</script>

<div style="margin-top: 5px; margin-bottom: 10px; width: 90%; text-align: center;">
<input
type="text"
id="subject"
title="Your Product"
value="Sloganizer"
style="width: 70%; margin-left: 2%; margin-top: 2%; margin-right: 3px; color: silver;"
onclick="if (!this.clicked) { this.value = ''; this.style.color = null; this.clicked = true; }"
/>

<input
type="button"
value="Sloganize!"
onclick="sloganize();"
/>
</div>

<div
id="result"
style="display: none; width: 90%; margin-left: 2%; margin-top: 10px; text-align: center; border: 3px solid navy; background-color: #99CCFF;"
></div>
]]></Content>
</Module>

Change log

r20 by jonathan.hefner on Jul 14, 2008   Diff
[No log message]
Go to: 
Project members, sign in to write a code review

Older revisions

r19 by jonathan.hefner on Jul 14, 2008   Diff
[No log message]
r18 by jonathan.hefner on Jul 14, 2008   Diff
[No log message]
r16 by jonathan.hefner on Jul 14, 2008   Diff
[No log message]
All revisions of this file

File info

Size: 2971 bytes, 93 lines
Powered by Google Project Hosting