From d3463dc5e08cc80191e78e3b9f12730724a6a251 Mon Sep 17 00:00:00 2001 From: jeremy rutman Date: Thu, 1 Sep 2022 18:20:07 -0500 Subject: [PATCH] Add files via upload --- The Code of the Geeks v3.1 Generator | 2643 ++++++++++++++++++++++++++ prompt.js | 276 +++ 2 files changed, 2919 insertions(+) create mode 100644 The Code of the Geeks v3.1 Generator create mode 100644 prompt.js diff --git a/The Code of the Geeks v3.1 Generator b/The Code of the Geeks v3.1 Generator new file mode 100644 index 0000000..b26e2b1 --- /dev/null +++ b/The Code of the Geeks v3.1 Generator @@ -0,0 +1,2643 @@ + +The Code of the Geeks v3.1 Generator + + +

The Generator for The Code of the Geeks v3.1

+Last updated: July 12, 1995

+ +


+
+

Instructions

+
+
+ +The geek code consists of several categories. Each category is labeled +with a letter and some qualifiers. Go through each category and determine +which set of qualifiers best describes you in that category. By selecting +the right qualifiers and submitting this form, you are able to construct +your overall geek code. It is this single line of code that will inform +other geeks the world over of what a great geek you actually are. +

+Some of the qualifiers will very probably not match with you exactly. It +is impossible to cover all possibilities in each category. Simply choose +that qualifier that most closely matches you. Also, some activities +described in a specific qualifier you may not engage in, while you do +engage in others. Each description of each qualifier describes the wide +range of activities that apply, so as long as you match with one, you can +probably use that qualifier. +

+


+
+

Variables

+
+
+

+Geeks can seldom be strictly quantified. To facilitate the fact that +within any one category the geek may not be able determine a specific +rating, variables have been designed to allow this range to be included. +

+


+

+In each category, there will be four buttons right after the category +description. Each is described here. +

+
@ +
for this variable, said trait is not very rigid, may change + with time or with individual interaction. For example, + Geeks who happen to very much enjoy Star Trek: The Next + Generation, but dislike the old 60's series might list + themselves as t++@. +
$ +
Indicates that this particular category is done for a + living. For example, UL+++$ indicates that the person + utilizes Unix and gets paid for it. Quite a lucky geek, + for sure. +
? +
Unless stated otherwise within the specific category, the ? + is placed after the category identifier and indicates that the + geek has no knowledge about that specific category. For + example, a person that has never even heard of Babylon 5, + would list their Babylon 5 category as 5? +
! +
Placed BEFORE the category. Unless stated otherwise, + indicates that the person refuses to participate in this + category. This is unlike the ? variable as the ? indicates + lack of knowledge, while the ! indicates stubborn refusal to + participate. For example, !E would be a person that just + plain refuses to have anything to do with Emacs, while E? + would be a person that doesn't even know what Emacs is. +
+

+


+

+For each qualifier in a category, there are three buttons. The first +button is manditory for the category. This is your baseline rating in +the category. The second two buttons are optional and may be used to +modify the baseline rating. Those modifiers are described below + +

+
() +
for indicating "cross-overs" or ranges. Geeks who go from + C+ to C--- depending on the situation (i.e. mostly "c+") could + use C+(---). @ is different from () in that () has finite + limits within the category, while @ ranges all over. +
> +
for 'wannabe' ratings. Indicating that while the geek is + currently at one rating, they are striving to reach another. + For example, C->$ indicating a geek that is currently + computer savvy, but wants to someday make money at it. +
+
+

+


+
+

Types of Geeks

+
+
+

+ +Geeks come in many flavors. The flavors relate to the vocation (or, if a +student, what they are training in) of the particular geek. To start a +code, a geek must declare himself or herself to be a geek. To do this, +simply choose the button which denotes your occupation or field of study. +Multi-talented geeks with more than one vocational training should click +on all applicable areas (For those with many areas, the GAT check box +might be for you). + +

+

+
GB --- Geek of Business +
GC --- Geek of Classics +
GCA -- Geek of Commercial Arts +
GCM -- Geek of Computer +Management +
GCS -- Geek of Computer +Science +
GCC -- Geek of Communications +
GE --- Geek of Engineering +
GED -- Geek of Education +
GFA -- Geek of Fine Arts +
GG --- Geek of Government +
GH --- Geek of Humanities +
GIT -- Geek of Information +Technology +
GJ --- Geek of +Jurisprudence (Law) +
GLS -- Geek of Library Science +
GL --- Geek of Literature +
GMC -- Geek of Mass +Communications +
GM --- Geek of Math +
GMD -- Geek of Medicine +
GMU -- Geek of Music +
GPA -- Geek of Performing Arts +
GP --- Geek of Philosophy +
GS --- Geek of Science +(Physics, Chemistry, Biology, etc.) +
GSS -- Geek of Social +Science (Psychology, Sociology, etc.) +
GTW -- Geek of Technical +Writing

+

GO --- Geek of Other. Some +types of geeks deviate from the + normal geek activities. This is encouraged as true geeks + come from all walks of life. +
GU --- Geek of +'Undecided'. This is a popular vocation with + incoming freshmen. +

+

G! --- Geek of no +qualifications. A rather miserable existence, you would think. + +

+

GAT -- Geek of All Trades. +For those geeks that can do + anything and everything. GAT usually precludes the use + of other vocational descriptors. +
+

+


+
+

Appearance

+
+
+

+


+

+

Dress

+It is said that "clothes make the man". Well, I understood that I was made +by a mommy and a daddy (and there's even a category to describe the process +below!). Maybe the people who made up that saying aren't being quite that +literal... +

+

+
+ For this variable I vary + wildly. +
I get paid for my involvement in +fashion. +
I'd like to get paid for my +involvement in fashion. +
+ +() +> +d++ +
I tend to wear conservative dress such as a business suit or worse, + a tie. +
+ +() +> +d+ +
Good leisure-wear. Slacks, button-shirt, etc. No jeans, + tennis shoes, or t-shirts. +
+ +() +> +d +
I dress a lot like those found in catalog ads. Bland, + boring, without life or meaning. +
+ +() +> +d- +
I'm usually in jeans and a t-shirt. +
+ +() +> +d-- +
My t-shirts go a step further and have a trendy political + message on them. +
+ +() +> +d--- +
Punk dresser, including, but not limited to, torn jeans + and shirts, body piercings, and prominent tattoos. +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

+ +dx +
Cross Dresser +
+ +d? +
I have no idea what I am wearing right now, let alone + what I wore yesterday. +
+ +!d +
No clothing. Quite a fashion statement, don't you think? +
+ +dpu +
I wear the same clothes all the time, no matter the + occasion, forgetting to do laundry between wearings. +
+

+


+

+

Shape

+Geeks come in many shapes and sizes. Shape code is divided into two parts. +The first indicates height, while the second indicates roundness. +

+

Height

+
+
+ +() + > +s+++ +
I usually have to duck through doors. +
+ +() + > +s++ +
I'm a basketball candidate. +
+ +() + > +s+ +
I'm a little taller than most. +
+ +() + > +s +
I'm a geek of average height. +
+ +() + > +s- +
I look up to most people. +
+ +() + > +s-- +
I look up to damn near everybody. +
+ +() + > +s--- +
I take a phone book with me when I go out so I can + see to eat dinner. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

Roundness

+
+
+ +() + > +s+++ +
I take up three movie seats. +
+ +() + > +s++ +
I'm a linebacker candidate. +
+ +() + > +s+ +
I'm a little rounder than most. +
+ +() + > +s +
I'm a geek of average roundness. +
+ +() + > +s- +
Everyone tells me to gain a few pounds. +
+ +() + > +s-- +
I tend to have to fight against a strong breeze. +
+ +() + > +s--- +
My bones are poking through my skin. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+ +

+


+

Age

+

+The only way to become a true geek is through practice and experience. To +this end, your age becomes an important part of your geekiness. Use the +qualifiers below to show your age (in Terran years). Also, please use +BASE 10 numbers. +

+

+
a+++ +
60 and up +
a++ +
50-59 +
a+ +
40-49 +
a +
30-39 +
a- +
25-29 +
a-- +
20-24 +
a--- +
15-19 +
a---- +
10-14 +
a----- +
9 and under (Geek is training?) +

+

a? +
immortal +
!a +
it's none of your business how old I am +
+ +
+
+

Computers

+
+
+

+


+

Computers

+Most geeks identify themselves by their use of computers and computer +networks. In order to quantify your geekiness level on computers, consult +the following (consider the term 'computers' synonymous with 'computer +network'). This category represents "general" computer aptitude. +Categories below will get into specifics. +

+

+
For this variable I vary widely. +
I get paid to use computers. +
I'd like to get paid to use +computers. +
I don't know what a computer is. +
I refuse to use computers. +
+ +() + > +C++++ +
I'll be first in line to get the new cybernetic interface + installed into my skull. +
+ +() + > +C+++ +
You mean there is life outside of Internet? You're shittin' + me! I haven't dragged myself to class in weeks. +
+ +() + > +C++ +
Computers are a large part of my existence. When I get up + in the morning, the first thing I do is log myself in. I + play games or mud on weekends, but still manage to stay + off of academic probation. +
+ +() + > +C+ +
Computers are fun and I enjoy using them. I play a mean + game of DOOM! and can use a word processor without resorting + to the manual too often. I know that a 3.5" disk is not a + hard disk. I also know that when it says 'press any key to + continue', I don't have to look for a key labeled 'ANY'. +
+ +() + > +C +
Computers are a tool, nothing more. I use it when it serves + my purpose. +
+ +() + > +C- +
Anything more complicated than my calculator and I'm screwed. +
+ +() + > +C-- +
Where's the on switch? +
+ +() + > +C--- +
If you even mention computers, I will rip your head off! +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

UNIX

+ +It seems that a Unix-based operating system is the OS of choice among most +geeks. In addition to telling us about your unix abilities, you can also +show which specific unix OS you are using. To accomplish this, you include +a letter showing the brand with your rating. For example: UL++++ would +indicate a sysadmin running Linux. +

+

+
For this variable I vary widely. +
I get paid to use UNIX. +
I'd like to get paid to use UNIX. +
I don't know what UNIX is. +
I refuse to use UNIX. + +
B - BSD (use this unless your BSDish system is mentioned below) +
L - Linux +
U - Ultrix +
A - AIX +
V - SysV +
H - HPUX +
I - IRIX +
O - OSF/1 (aka Digital Unix) +
S - Sun OS/Solaris +
C - SCO Unix +
X - NeXT +
* - Some other one not listed +

+

+ + +() + > +U++++ +
I am the sysadmin. If you try and crack my machine don't be + surprised if the municipal works department gets an + "accidental" computer-generated order to put start a new + landfill on your front lawn or your quota is reduced to 4K. +
+ +() + > +U+++ +
I don't need to crack /etc/passwd because I just modified + su so that it doesn't prompt me. The admin staff doesn't + even know I'm here. If you don't understand what I just + said, this category does NOT apply to you! +
+ +() + > +U++ +
I've get the entire admin ticked off at me because I am + always using all of the CPU time and trying to run programs + that I don't have access to. I'm going to try cracking + /etc/passwd next week, just don't tell anyone. +
+ +() + > +U+ +
I not only have a Unix account, but I slam VMS any chance get. +
+ +() + > +U +
I have a Unix account to do my stuff in +
+ +() + > +U- +
I have a VMS account. +
+ +() + > +U-- +
I've seen Unix and didn't like it. DEC rules! +
+ +() + > +U--- +
Unix geeks are actually nerds in disguise. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Perl

+If you enjoy at least U++ status you have to know about Perl, so you +might as well rate yourself in this sub-category. Non-Unix geeks don't +know what they're missing. +

+

+
I vary widely for this category. +
I get paid to program Perl. +
I'd like to get paid to program Perl. +
+ +() + > +P+++++ +
I am Larry Wall, Tom Christiansen, or Randal Schwartz. +
+ +() + > +P++++ +
I don't write Perl, I speak it. Perl has superseded all + other programming languages. I firmly believe that all + programs can be reduced to a Perl one-liner. I use Perl to + achieve U+++ status. +
+ +() + > +P+++ +
Perl is a very powerful programming tool. Not only do I no + longer write shell scripts, I also no longer use awk or + sed. I use Perl for all programs of less than a thousand + lines. +
+ +() + > +P++ +
Perl is a powerful programming tool. I don't write shell + scripts anymore because I write them in Perl. +
+ +() + > +P+ +
I know of perl. I like perl. I just haven't learned much + perl, but it is on my agenda. +
+ +() + > +P +
I know Perl exists, but that's all. +
+ +() + > +P- +
What's Perl got that awk and sed don't have? +
+ +() + > +P-- +
Perl users are sick, twisted programmers who are just showing off. +
+ +() + > +P--- +
Perl combines the power of sh, the clarity of sed, and the + performance of awk with the simplicity of C. It should be + banned. +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

P? +
What's Pearl? +
!P +
Our paranoid admin won't let us install Perl! Says it's a + "hacking tool". +
+

+


+

Linux

+Linux is a hacker-written operating system virtually identical to unix. It +originally and continues to run on your standard 386/486/Pentium PC, but has +also been ported to other systems. Because it is still a young OS, and +because it is continually evolving from hacker changes and support, it is +important that the geek list his Linux ability. +

+

+
I vary widely for this category. +
I get paid to work with Linux. +
I'd like to get paid to work with +Linux.
What's Linux? +
+ +() + > +L+++++ +
I am Linus, grovel before me. +
+ +() + > +L++++ +
I am a Linux wizard. I munch C code for breakfast and have + enough room left over for a kernel debugging. I have so + many patches installed that I lost track about ten versions + ago. Linux newbies consider me a net.god. +
+ +() + > +L+++ +
I use Linux exclusively on my system. I monitor + comp.os.linux.* and even answer questions sometimes. +
+ +() + > +L++ +
I use Linux ALMOST exclusively on my system. I've given + up trying to achieve Linux.God status, but welcome the OS + as a replacement for DOS. I only boot to DOS to play games. +
+ +() + > +L+ +
I've managed to get Linux installed and even used it a few + times. It seems like it is just another OS. +
+ +() + > +L +
I know what Linux is, but that's about all +
+ +() + > +L- +
I have no desire to use Linux and frankly don't give a rats + patootie about it. There are other, better, operating + systems out there. Like Mac, DOS, or Amiga-OS. Or, + better yet even, would be another free Unix OS like FreeBSD. +
+ +() + > +L-- +
Unix sucks. Because Linux = Unix. Linux Sucks. I worship + Bill Gates. +
+ +() + > +L--- +
I am Bill Gates. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Emacs

+GNU Emacs is the do-all be-everything editor/operating system available +for just about every computer architecture out there. +

+

+
I vary widely for this category. +
I get paid to use Emacs. +
I'd like to get paid to use Emacs. +
What's Emacs? +
I don't use Emacs. +
+ +() + > +E+++ +
Emacs is my login shell!! M-x doctor is my psychologist! + I use emacs to control my TV and toaster oven! All you + vi people don't know what you're missing! I read + alt.relgion.emacs, alt.sex.emacs, and comp.os.emacs. +
+ +() + > +E++ +
I know and use elisp regularly! +
+ +() + > +E+ +
Emacs is great! I read my mail and news with it! +
+ +() + > +E +
Yeah, I know what emacs is, and use it as my regular + editor. +
+ +() + > +E- +
Emacs is too big and bloated for my tastes +
+ +() + > +E-- +
Emacs is just a fancy word processor +
+ +() + > +E--- +
Emacs sucks! vi forever!!! +
+ +() + > +E---- +
Emacs sucks! pico forever!!! +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

World Wide Web

+It's relatively new. It's little understood. Everybody's doing it. How +much of a web-surfer are you? +

+

+
I vary widely for this category. +
I get paid for my involvement +with the Web. +
I'd like to get paid for my +involvement with the Web. +
What's the Web? +
I don't use the web. +
+ +() + > +W+++ +
I am a WebMaster. Don't even think about trying to view + my homepage without the latest version of Netscape. When + I'm not on my normal net connection, I surf the web using + my Newton and a cellular modem. +
+ +() + > +W++ +
I have a homepage. I surf daily. My homepage is + advertised in my .signature. +
+ +() + > +W+ +
I have the latest version of Netscape, and wander the web + only when there's something specific I'm looking for. +
+ +() + > +W +
I have a browser and a connection. Occasionally I'll use + them. +
+ +() + > +W- +
The web is really a pain. Life was so much easier when + you could transfer information by simple ASCII. Now + everyone won't even consider your ideas unless you spiff + them up with bandwidth-consuming pictures and pointless + information links. +
+ +() + > +W-- +
A pox on the Web! It wastes time and bandwidth and just + gives the uneducated morons a reason to clutter the + Internet. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

USENET News

+Usenet, a global collection of flaming opinions and senseless babble, was +designed as a way to eat up precious spool space on a system's hard drive. +It also is a way for people to distribute pornography. +

+

+
I vary widely for this category. +
I get paid for my involvement +with USENET. +
I'd like to get paid for my +involvement with USENET. +
What's USENET? +
I don't use USENET. +
+ +() + > +N++++ +
I am Tim Pierce +
+ +() + > +N+++ +
I read so many news groups that the next batch of news + comes in before I finish reading the last batch, and I + have to read for about 2 hours straight before I'm caught + up on the morning's news. Then there's the afternoon... +
+ +() + > +N++ +
I read all the news in a select handful of groups. +
+ +() + > +N+ +
I read news recreationally when I have some time to kill. +
+ +() + > +N +
Usenet News? Sure, I read that once +
+ +() + > +N- +
News is a waste of my time and I avoid it completely +
+ +() + > +N-- +
News sucks! 'Nuff said. +
+ +() + > +N--- +
I work for Time Magazine. +
+ +() + > +N---- +
I am a Scientologist. +
+ +() + > +N* +
All I do is read news +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

USENET Oracle

+ +With the advent of the electronic age, and especially high-speed e-mail +communication, the spirit of the Oracles found a new outlet, and we now +recognize another great Oracle, the Usenet Oracle. +

+For more information, check out the newsgroups rec.humor.oracle and rec.humor.oracle.d or the FTP archives +at cs.indiana.edu:/pub/oracle. +Additional information and instructions can be found by sending an email +message with the subject of 'help' to oracle@cs.indiana.edu. + +

+

+
I vary widely for this category. +
I get paid for my involvement +with the USENET Oracle. +
I'd like to get paid for my +involvement with the USENET Oracle. +
What's the USENET Oracle? +
I don't consult the USENET Oracle. +
+ +() + > +o+++++ +
I am Steve Kinzler +
+ +() + > +o++++ +
I am an active Priest. +
+ +() + > +o+++ +
I was a Priest, but have retired. +
+ +() + > +o++ +
I have made the Best Of Oracularities. +
+ +() + > +o+ +
I have been incarnated at least once. +
+ +() + > +o +
I've submitted a question, but it has never been incarnated. +
+ +() + > +o- +
I sent my question to the wrong group and got flamed. +
+ +() + > +o-- +
Who needs answers from a bunch of geeks anyhow? +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Kibo

+Kibo is. That is all that can be said. If you don't understand, read +alt.religion.kibology +

+

+
I vary widely for this category. +
I get paid for my involvement +with Kibo. +
I'd like to get paid for my +involvement with Kibo. +
What's Kibo? +
I intentionally avoid Kibo. +
+ +() + > +K++++++ +
I am Kibo +
+ +() + > +K+++++ +
I've had sex with Kibo +
+ +() + > +K++++ +
I've met Kibo +
+ +() + > +K+++ +
I've gotten mail from Kibo +
+ +() + > +K++ +
I've read Kibo +
+ +() + > +K+ +
I like Kibo +
+ +() + > +K +
I know who Kibo is +
+ +() + > +K- +
I don't know who Kibo is +
+ +() + > +K-- +
I dislike Kibo +
+ +() + > +K--- +
I am currently hunting Kibo down with the intent of ripping + his still-beating heart out of his chest and showing it + to him as he dies +
+ +() + > +K---- +
I am Xibo +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+
+

Microsoft Windows

+A good many geeks suffer through the use of various versions of MicroSoft +Windows running on or as a replacement for DOS. Rate +your Windows Geekiness.

+

+
I vary widely for this category. +
I get paid for my involvement with +Windows. +
I'd like to get paid for my +involvement with Windows. +
What's Windows? +
I don't use Windows. +
+ +() + > +w+++++ +
I am Bill Gates +
+ +() + > +w++++ +
I have Windows, Windows 95, Windows NT, and Windows NT + Advanced Server all running on my SMP RISC machine. I + haven't seen daylight in six months. +
+ +() + > +w+++ +
I am a MS Windows programming god. I wrote a VxD driver to + allow MS Windows and DOS to share the use of my waffle iron. + P.S. Unix sux. +
+ +() + > +w++ +
I write MS Windows programs in C and think about using C++ + someday. I've written at least one DLL. +
+ +() + > +w+ +
I have installed my own custom sounds, wallpaper, and screen + savers so my PC walks and talks like a fun house. Oh yeah, + I have a hundred TrueType(tm) fonts that I've installed but + never used. I never lose Minesweeper and Solitaire +
+ +() + > +w +
Ok, so I use MS Windows, I don't have to like it. +
+ +() + > +w- +
I'm still trying to install MS Windows and have at least one + peripheral that never works right +
+ +() + > +w-- +
MS Windows is a joke operating system. Hell, it's not + even an operating system. NT is Not Tough enough for me + either. 95 is how may times it will crash an hour. +
+ +() + > +w--- +
Windows has set back the computing industry by at least 10 + years. Bill Gates should be drawn, quartered, hung, shot, + poisoned, disembowelled, and then REALLY hurt. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+
+

OS/2

+The operating system that looks a lot like Windows, acts a lot like +Windows, but is much better than Windows. +

+

+
I vary widely for this category. +
I get paid for my involvement +with OS/2. +
I'd like to get paid for my +involvement with OS/2. +
What's the OS/2? +
I don't use OS/2. +
+ +() + > +O+++ +
I live, eat and breathe OS/2. All of my hard drives are + HPFS. I am the Anti-Gates. +
+ +() + > +O++ +
I use OS/2 for all my computing needs. I use some DOS + and Windows programs, but rune them under OS/2. If the + program won't run under OS/2, then obviously I don't need + it. +
+ +() + > +O+ +
I keep a DOS partition on my hard drive "just in case". + I'm afraid to try HPFS. +
+ +() + > +O +
I finally managed to get OS/2 installed but wasn't too + terribly impressed. +
+ +() + > +O- +
Tried it, didn't like it. +
+ +() + > +O-- +
I can't even get the thing to install! +
+ +() + > +O--- +
Windows RULES!!! Long live Bill Gates. (See w++++) +
+ +() + > +O---- +
I am Bill Gates of Borg. OS/2 is irrelevant. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+
+

Macintosh

+Many geeks have abandoned the character-based computer altogether and +moved over to the macintosh. It in important to give notification of your +Mac rating. +

+

+
I vary widely for this category. +
I get paid for my +involvement with Macs. +
I'd like to get paid for my +involvement with Macs. +
What's a Mac? +
I don't use a Mac. +
+ +() + > +M++ +
I am a Mac guru. Anything those dos putzes and unix + nerds can do, I can do better, and if not, I'll write + the damn software to do it. +
+ +() + > +M+ +
A Mac has it's uses and I use it quite often. +
+ +() + > +M +
I use a Mac, but I'm pretty indifferent about it. +
+ +() + > +M- +
Macs suck. All real geeks have a character prompt. +
+ +() + > +M-- +
Macs do more than suck. They make a user stupid by + allowing them to use the system without knowing what + they are doing. Mac weenies have lower IQs than the + fuzz in my navel. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+
+

VMS

+Many geeks use the VMS operating system by DEC for all of their mainframe +and network activity. +

+

+
I vary widely for this category. +
I get paid to use VMS. +
I'd like to get paid to use VMS. +
What's the VMS? +
I don't use VMS. +
+ +() + > +V+++ +
I am a VMS sysadmin. I wield far more power than those + UNIX admins, because UNIX can be found on any dweeb's + desktop. Power through obscurity is my motto. +
+ +() + > +V++ +
Unix is a passing fad compared to the real power in the + universe, my VMS system. +
+ +() + > +V+ +
I tend to like VMS better than Unix +
+ +() + > +V +
I've used VMS. +
+ +() + > +V- +
Unix is much better than VMS for my computing needs. +
+ +() + > +V-- +
I would rather smash my head repeatedly into a brick wall + than suffer the agony of working with VMS. It's + reminiscent of a dead and decaying pile of moose droppings. + Unix rules the universe. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+
+
+

Politics

+
+
+

+


+

Political and Social Issues

+We live is a society where everyone not only has a right to, but is +expected to, whine and complain about everyone else. Rate where, in +general, your political views on different social issues fall. +

+

+
I vary widely for this category. +
I get paid to have social views. +
I'd like to get paid to have social +views. +
Politics? Society? What are they? +
I don't have any social views. +
+ +() + > +PS+++ +
Legalize drugs! Abolish the government. "Fuck the draft!" +
+ +() + > +PS++ +
I give to liberal causes. I march for gay rights. I'm a + card carrying member of the ACLU. Keep abortion safe and + legal. +
+ +() + > +PS+ +
My whole concept of liberalism is that nobody has the + right to tell anybody else what to do, on either side of + the political fence. If you don't like it, turn the + bloody channel. +
+ +() + > +PS +
I really don't have an opinion; nobody's messing with my + freedoms right now. +
+ +() + > +PS- +
Label records! Keep dirty stuff off the TV and the + Internet. +
+ +() + > +PS-- +
Oppose sex education, abortion rights, gay rights. + Rush Limbaugh is my spokesman. +
+ +() + > +PS--- +
Repent left-wing sinners and change your wicked evil ways. + Buchanan/Robertson in '96. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Politics and Economic Issues

+Social and economic attitudes are seldom on the same side of the +political fence. Of course, most geeks don't really care much about +economics; having no money left after buying new computer toys. +

+

+
I vary widely for this category. +
I get paid to deal with economic issues. +
I'd like to get paid to deal with +economic issues. +
Economics? What's that? +
I don't care about economics. +
+ +() + > +PE+++ +
Abolish antitrust legislation. Raise taxes on everyone + but the rich so that the money can trickle-down to the + masses. +
+ +() + > +PE++ +
Keep the government off the backs of businesses. + Deregulate as much as possible. +
+ +() + > +PE+ +
Balance the budget with spending cuts and an amendment. +
+ +() + > +PE +
Distrust both government and business. +
+ +() + > +PE- +
It's ok to increase government spending, so we can help + more poor people. Tax the rich! Cut the defense budget! +
+ +() + > +PE-- +
Capitalism is evil! Government should provide the + services we really need. Nobody should be rich. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Cypherpunk

+With the birth of the overused buzzword "The Information Superhighway", +concerns over privacy from evil governmental bad-guys{tm} has led to the +formation of of an unofficial, loosely organized band of civil +libertarians who spend much of their time discussing how to ensure privacy +in the information future. This group is known by some as "cypherpunks" +(by others, as anarchistic subversives). To this end, tell us how punkish +you are. +

+

+
I vary widely for this category. +
I get paid to be a cypherpunk. +
I'd like to get paid to be a +cypherpunk. +
What's a cypherpunk? +
I am not a cypherpunk. +
+ +() + > +Y+++ +
I am T.C. May +
+ +() + > +Y++ +
I am on the cypherpunks mailing list and active around + Usenet. I never miss an opportunity to talk about the + evils of Clipper and ITAR and the NSA. Orwell's 1984 is + more than a story, it is a warning to our's and future + generations. I'm a member of the EFF. +
+ +() + > +Y+ +
I have an interest and concern in privacy issues, but in + reality I am not really all that active or vocal. +
+ +() + > +Y +
I'm pretty indifferent on the whole issue. +
+ +() + > +Y- +
It seems to me that all of these concerns are a little + extreme. I mean, the government must be able to protect + itself from criminals and the populace from indecent + speech. +
+ +() + > +Y-- +
Get a life. The only people that need this kind of + protection are people with something to hide. I think + cypherpunks are just a little paranoid. +
+ +() + > +Y--- +
I am L. Detweiler. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

PGP

+Pretty Good Privacy (aka PGP) is a program available on many platforms +that will encrypt files so that prying eyes (particularly governmental) +can't look at them. +

+

+
I vary widely for this category. +
I get paid to use PGP. +
I'd like to get paid to use PGP. +
What's PGP? +
I don't use PGP. +
+ +() + > +PGP++++ +
I am Philip Zimmerman +
+ +() + > +PGP+++ +
I don't send or answer mail that is not encrypted, or at + the very least signed. If you are reading this without + decrypting it first, something is wrong. IT DIDN'T COME + FROM ME! +
+ +() + > +PGP++ +
I have the most recent version and use it regularly +
+ +() + > +PGP+ +
"Finger me for my public key" +
+ +() + > +PGP +
I've used it, but stopped long ago. +
+ +() + > +PGP- +
I don't have anything to hide. +
+ +() + > +PGP-- +
I feel that the glory of the Internet is in the anarchic, + trusting environment that so nurtures the exchange of + information. Encryption just bogs that down. +
+ +() + > +PGP--- +
If you support encryption on the Internet, you must be a + drug dealer or terrorist or something like that. +
+ +() + > +PGP---- +
Oh, here is something you all can use that is better + (insert clipper here). +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+
+

Entertainment

+
+
+

+


+

Star Trek

+Most geeks have an undeniable love for the Star Trek television show (in +any of its different incarnations). Because GEEK is often synonymous with +TREKKIE (real geeks aren't so anal as to label themselves TREKKER), it is +important that all geeks list their Trek rating. +

+

+
I vary widely for this category. +
I get paid for my involvement +with Star Trek. + +
I'd like to get paid for my +involvement with Star Trek. + +
What's the Star Trek? +
I don't watch Star Trek. +
+ +() + > +t+++ +
It's not just a TV show, it's a religion. I know all about + warp field dynamics and the principles behind the + transporter. I have memorized the TECH manual. I speak + Klingon. I go to cons with Vulcan ears on. I have no life. +
+ +() + > +t++ +
It's the best show around. I have all the episodes and the + movies on tape and can quote entire scenes verbatim. I've + built a few of the model kits too. But you'll never + catch me at one of those conventions. Those people are + kooks. +
+ +() + > +t+ +
It's a damn fine TV show and is one of the only things + good on television any more. +
+ +() + > +t +
It's just another TV show +
+ +() + > +t- +
Maybe it is just me, but I have no idea what the big deal + with Star Trek is. Perhaps I'm missing something but I just + think it is bad drama. +
+ +() + > +t-- +
Star Trek is just another Space Opera. William Shatner + isn't an actor, he's a poser! And what's with this Jean-Luc + Picard? A Frenchman with a British accent? Come on. I'd + only watch this show if my remote control broke. Isn't + Voyager just a rehash of Lost in Space? Has Sisko even + breathed in the last two seasons? +
+ +() + > +t--- +
Star Trek SUCKS! It is the worst crap I have ever seen! + Hey, all you trekkies out there, GET A LIFE! (William + Shatner is a t---) +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

t* +
I identify with Barclay, the greatest of the Trek Geeks. +
+

+


+

Babylon 5

+ +For many years, Sci-Fi geeks have wished for a television show that would +overcome the limitations of Star Trek. For many, a show called Babylon 5 +has met that demand, with a deep storyline, exciting characters and +state-of-the-art computer generated effects. +

+

+
I vary widely for this category. +
I get paid for my +involvement with Babylon 5. +
I'd like to get paid for my +involvement with Babylon 5. +
What's the Babylon 5? +
I don't watch Babylon 5. +
+ +() + > +5++++ +
I am J. Michael Straczynski +
+ +() + > +5+++ +
I am a True Worshipper of the Church of Joe who lives + eats breathes and thinks Babylon 5, and has Evil thoughts + about stealing Joe's videotape archives just to see + episodes earlier. I am planning to break into the bank + and steal the triple-encoded synopsis of the 5-year arc. +
+ +() + > +5++ +
Finally a show that shows what a real future would look + like. None of this Picardian "Let's talk about it and be + friends" crap. And what's this? We finally get to see a + bathroom! Over on that Enterprise, they've been holding + it for over seven years! +
+ +() + > +5+ +
Babylon 5 certainly presents a fresh perspective in the + Sci-Fi universe. I watch it weekly. +
+ +() + > +5 +
I've seen it, I am pretty indifferent to it. +
+ +() + > +5- +
This show is sub-par. The acting is wooden, the special + effects are obviously poor quality. In general, it seems + like a very cheap Star Trek ripoff. +
+ +() + > +5-- +
You call this Sci-Fi? That is such a load of crap! This + show is just a soap with bad actors, piss-poor effects, + and lame storylines. Puh-leese. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

X-Files

+The Fox Network's Friday evening show The X-Files has become the staple +of Friday geekhood. Any show that has aliens, governmental conspiracies, +aliens, psychic powers, aliens, and other weird stuff is, by definition, +a geeky show. +

+

+
I vary widely for this category. +
I get paid for my involvement +with X-Files. + +
I'd like to get paid for my +involvement with X-Files. +
What's the X-Files? +
I don't watch X-Files. +
+ +() + > + X++++ +
I am Chris Carter +
+ +() + > + X+++ +
This is the BEST show on TV, and it's about time. I've + seen everything David Duchovny and Gillian Anderson have + ever done that been recorded and I'm a loyal Duchovny/ + Gillian Anderson fan. I've Converted at least 10 people. + I have every episode at SP, debate the fine details on-line, + and have a credit for at least 2 YAXAs. +
+ +() + > +X++ +
This is one of the better shows I've seen. I wish I'd + taped everything from the start at SP, because I'm wearing + out my EP tapes. I'll periodically debate online. I've + Converted at least 5 people. I've gotten a YAXA. +
+ +() + > +X+ +
I've Converted my family and watch the show when I + remember. It's really kinda fun. +
+ +() + > +X +
Ho hum. Just another Fox show. +
+ +() + > +X- +
It's ok if you like paranoia and conspiracy stories, but, + let's face it, it's crap. +
+ +() + > +X-- +
If I wanted to watch this kind of stuff, I'd talk to + Oliver Stone +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Role Playing

+Role-playing games such as Dungeons & Dragons have long been a part of the +traditional geek life. Because geeks often become so involved in their +role-playing that they lose touch with reality, include one of the following +role-playing codes. +

+

+
I vary widely for this category. +
I get paid for my +involvement with role-play. + +
I'd like to get paid for +my involvement with role-playing. +
What's role-playing? +
I don't role-play. +
+ +() + > +R+++ +
I've written and published my own gaming materials. +
+ +() + > +R++ +
There is no life outside the role of the die. I know all of + piddly rules of (chosen game). _MY_ own warped rules scare + the rest of the players. +
+ +() + > +R+ +
I've got my weekly sessions set up and a character that I + know better than I know myself. +
+ +() + > +R +
Role-Playing? That's just something to do to kill a + Saturday afternoon +
+ +() + > +R- +
Gosh, what an utter waste of time! +
+ +() + > +R-- +
Role-Players are instruments of pure evil. +
+ +() + > +R-- +
I work for T$R. +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

+ +R* +
I thought life WAS role-playing? +
+

+


+

Television

+Many geeks have lives that revolve around television. +

+

+
I vary widely for this category. +
I get paid for my involvement +with television. +
I'd like to get paid for my +involvement with television. + +
What's a television? +
+ +() + > +tv+++ +
There's nothing I can experience "out there" that I can't + see coming over my satellite dish. I wish there were MORE + channels. I live for the O.J. Trial. +
+ +() + > +tv++ +
I just leave the tv on, to make sure I don't miss anything. +
+ +() + > +tv+ +
I watch some tv every day. +
+ +() + > +tv +
I watch only the shows that are actually worthwhile, + such as those found on PBS. +
+ +() + > +tv- +
I watch tv for the news and 'special programming.' +
+ +() + > +tv-- +
I turn my tv on during natural disasters. +

+

!tv +
I do not own a television. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Books

+In addition (or maybe on the other hand), many geeks have lives that revolve +around books. +

+

+
I vary widely for this category. +
I get paid for my involvement +with books. +
I'd like to get paid for my +involvement with books. + +
What's a book? +
I don't read books. +
+ +() + > +b++++ +
I read a book a day. I have library cards in three states. I have + discount cards from every major bookstore. I've ordered books from + another country to get my Favorite Author Fix. +
+ +() + > +b+++ +
I consume a few books a week as part of a staple diet. +
+ +() + > +b++ +
I find the time to get through at least one new book a month. +
+ +() + > +b+ +
I enjoy reading, but don't get the time very often. +
+ +() + > +b +
I read the newspaper and the occasional book. +
+ +() + > +b- +
I read when there is no other way to get the information. +
+ +() + > +b-- +
I did not actually READ the geek code, I just had someone + tell me. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

Dilbert

+Simply the geekiest comic strip in existence. + +http://www.dilbert.com/ for more information. +

+

+
I vary widely for this category. +
I get paid for my involvement +with Dilbert. +
I'd like to get paid for my +involvement with Dilbert. +
What's Dilbert? +
I don't read Dilbert. +
+ +() + > + DI+++++ +
I am Scott Adams. +
+ +() + > +DI++++ +
I've received mail from Scott Adams. I'm in the DNRC + (Dogbert's New Ruling Class). +
+ +() + > +DI+++ +
I am a Dilbert prototype +
+ +() + > +DI++ +
I work with people that act a lot like Dilbert and his boss. +
+ +() + > +DI+ +
I read Dilbert daily, often understanding it +
+ +() + > +DI +
I read Dilbert infrequently, rarely understanding it +
+ +() + > +DI- +
Is that the comic about the engineers? +
+ +() + > +DI-- +
Don't read it, but I think the dog is kinda cute. +
+ +() + > +DI--- +
I don't think it's funny to make fun of managers trying + their best to run their organizational units. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

DOOM!

+There is a game out for the PCs and other computers called DOOM. It's a +3D virtual reality simulation where you race around and blow things away +with large-caliber weaponry. This has led to a series of similar games +such as the Star Wars themed Dark Forces. Tell us about your abilities +with these 3D games. (yes, some of them aren't actually Doom. Cope!) +

+

+
I vary widely for this category. +
I get paid for my involvement with +DOOM. +
I'd like to get paid for my +involvement with DOOM. + +
What's DOOM? +
I don't play DOOM. +
+ +() + > +D+++ +
I crank out PWAD files daily, complete with new monsters, + weaponry, sounds and maps. I'm a DOOM God. I can solve + the original maps in nightmare mode with my eyes closed. +
+ +() + > +D++ +
I've played the shareware version and bought the real one + and I'm actually pretty good at the game. I occasionally + download PWAD files and play them too. +
+ +() + > +D+ +
It's a fun, action game that is a nice diversion on a lazy + afternoon. +
+ +() + > +D +
I've played the game and I'm pretty indifferent. +
+ +() + > +D- +
I've played the game and really didn't think it was all + that impressive. +
+ +() + > +D-- +
It's an overly-violent game and pure crap +
+ +() + > +D--- +
To hell with Doom, I miss Zork. +
+ +() + > +D---- +
I've seen better on my Atari 2600 +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+

The Geek Code

+The Geek Code has be become an important part of the Geek Experience. +All true geeks recognize the Geek Code, and some can even recite it. +

+

+
I vary widely for this category. +
I get paid for my involvement +with the Geek Code. +
I'd like to get paid for my +involvement with the Geek Code. +
What's a Geek Code? +
I don't have a Geek Code. +
+ +() + > +G++++ +
I am Robert Hayden +
+ +() + > +G++++ +
I have made a suggestion for future versions of the code (note that + making a suggestion just to get a G++++ rating doesn't count, you + also have to at least qualify for a G+++ rating :-)
+ +() + > +G+++ +
I have memorized the entire geek code, and can decode + others' codes in my head. I know by heart where to find + the current version of the code on the net. +
+ +() + > +G++ +
I know what each letter means, but sometimes have to look + up the specifics. +
+ +() + > +G+ +
I was once G++ (or higher), but the new versions are + getting too long and too complicated. +
+ +() + > +G +
I know what the geek code is and even did up this code. +
+ +() + > +G- +
What a tremendous waste of time this Geek Code is. +
+ +() + > +G-- +
Not only a waste of time, but it obviously shows that + this Hayden guy needs a life. +

+

Reset cross-over rating.
+
Reset wannabe rating. +
+

+


+
+

Lifestyle

+
+
+

+


+

Education

+All geeks have a varying amount of education. +

+

+
I vary widely for this category. +
I get paid for my involvement with +education. +
I'd like to get paid for my +involvement with education. +
What's an education? +
I don't have an education. +
+ +() + > +e+++++ +
I am Stephen Hawking +
+ +() + > +e++++ +
Managed to get my Ph.D. +
+ +() + > +e+++ +
Got a Masters degree +
+ +() + > +e++ +
Got a Bachelors degree +
+ +() + > +e+ +
Got an Associates degree +
+ +() + > +e +
Finished High School +
+ +() + > +e- +
Haven't finished High School +
+ +() + > +e-- +
Haven't even entered High School +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

e* +
I learned everything there is to know about life from the + "Hitchhiker's Trilogy". +
+

+


+

Housing

+Tell us about your geeky home. +

+

+
I vary widely for this category. +
I get paid to live where I do. +
I'd like to get paid to live where +I do. +
What's a house? +
+ +() + > +h++ +
Living in a cave with 47 computers and an Internet feed, + located near a Dominoes pizza. See !d. +
+ +() + > +h+ +
Living alone, get out once a week to buy food, no more than + once a month to do laundry. All surfaces covered. +
+ +() + > +h +
Friends come over to visit every once in a while to talk + about Geek things. There is a place for them to sit. +
+ +() + > +h- +
Living with one or more registered Geeks. +
+ +() + > +h-- +
Living with one or more people who know nothing about + being a Geek and refuse to watch Babylon 5. +
+ +() + > +h--- +
Married, (persons living romantically with someone might as + well label themselves h---, you're as good as there already.) +
+ +() + > +h---- +
Married with children - Al Bundy can sympathize +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

h! +
I am stuck living with my parents! +
h* +
I'm not sure where I live anymore. This lab/workplace seems + like home to me. +
+
+

Relationships

+While many geeks are highly successful at having relationships, a good +many more are not. Give us the gritty details. +
+
I vary widely for this category. +
I get paid to have relationships. +
I'd like to get paid to have +relationships. + +
What's a relationship? +
+ +() + > +r+++ +
Found someone, dated, and am now married. +
+ +() + > +r++ +
I've dated my current S.O. for a long time. +
+ +() + > +r+ +
I date frequently, bouncing from one relationship to + another. +
+ +() + > +r +
I date periodically. +
+ +() + > +r- +
I have difficulty maintaining a relationship. +
+ +() + > +r-- +
People just aren't interested in dating me. +
+ +() + > +r--- +
I'm beginning to think that I'm a leper or something, the + way people avoid me like the plague. +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

!r +
I've never had a relationship. +
r* +
signifying membership in the SBCA (Sour Bachelor(ette)'s + Club of America). The motto is 'Bitter, but not Desperate'. + First founded at Caltech. +
r% +
I was going out with someone, but the asshole dumped me. +
+

+


+

Sex

+Geeks have traditionally had problems with sex (ie, they never have any). +Because geeks are so wrapped up in their sexuality (or lack of sexuality for +that matter), it is important that the geek be willing to quantify their +sexual experiences. +

+This code also is used to denote the gender of the geek. Females use 'x' in +this category, while males use 'y'. Those that do not wish to disclose +their gender can use 'z'. For example: +

+

+For those persons who do not wish to give out any details of their sex life, +the use of z? (where z is the gender code) will allow you to do so. +

+

+
I vary widely for this category. +
I get paid to have sex. +
I'd like to get paid to have sex. +
+ +() + > +z+++++ +
I am Madonna +
+ +() + > +z++++ +
I have a few little rug rats to prove I've been there. + Besides, with kids around, who has time for sex? +
+ +() + > +z+++ +
I'm married, so I can get it (theoretically) whenever I + want. +
+ +() + > +z++ +
I was once referred to as 'easy'. I have no idea where that + might have come from though. +
+ +() + > +z+ +
I've had real, live sex. +
+ +() + > +z +
I've had sex. Oh! You mean with someone else? Then no. +
+ +() + > +z- +
Not having sex by choice. +
+ +() + > +z-- +
Not having sex because I just can't get any... +
+ +() + > +z--- +
Not having sex because I'm a nun or a priest. +

+

Reset cross-over rating.
+
Reset wannabe rating. +

+

z* +
I'm a pervert. +
z** +
I've been known to make perverts look like angels. +

+

!z +
Sex? What's that? I've had no sexual experiences. +
z? +
It's none of your business what my sex life is like (this + is used to denote your gender only). +
!z+ +
Sex? What's that? No experience, willing to learn! +
+
+
+
+
+
+
+
+
+
+ +The Geek Code is copyright (C) 1993, 1994, 1995 by Robert A. Hayden. All +rights reserved. You are free to distribute this code in electronic +format provided that the file remains unmodified and this copyright notice +remains attached. This copyright prohibits HTMLizing the code for +publication on the web. If you wish to publish abstracts or portions of +the code, contact the author for permission. If you wish to write an +article about the Geek Code, please contact the author. All creatures not +native to Earth are exempt from this copyright. +

+The The Geek Code Generator has been developed by Dylan Northrup. + +

\ No newline at end of file diff --git a/prompt.js b/prompt.js new file mode 100644 index 0000000..712127b --- /dev/null +++ b/prompt.js @@ -0,0 +1,276 @@ +/* + * Copyright 2017 SideeX committers + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +const originalPrompt = window.prompt +let nextPromptResult = false +let recordedPrompt = null + +const originalConfirmation = window.confirm +let nextConfirmationResult = false +let recordedConfirmation = null + +const originalAlert = window.alert +let recordedAlert = null + +function getFrameLocation() { + let frameLocation = '' + let currentWindow = window + let currentParentWindow + while (currentWindow !== window.top) { + currentParentWindow = currentWindow.parent + for (let idx = 0; idx < currentParentWindow.frames.length; idx++) + if (currentParentWindow.frames[idx] === currentWindow) { + frameLocation = ':' + idx + frameLocation + currentWindow = currentParentWindow + break + } + } + frameLocation = 'root' + frameLocation + return frameLocation +} + +//before record prompt + +// Not a top window +if (window !== window.top) { + window.prompt = function(text, defaultText) { + if (document.body.hasAttribute('SideeXPlayingFlag')) { + return window.top.prompt(text, defaultText) + } else { + let result = originalPrompt(text, defaultText) + let frameLocation = getFrameLocation() + window.top.postMessage( + { + direction: 'from-page-script', + recordedType: 'prompt', + recordedMessage: text, + recordedResult: result, + frameLocation: frameLocation, + }, + '*' + ) + return result + } + } + + window.confirm = function(text) { + if (document.body.hasAttribute('SideeXPlayingFlag')) { + return window.top.confirm(text) + } else { + let result = originalConfirmation(text) + let frameLocation = getFrameLocation() + window.top.postMessage( + { + direction: 'from-page-script', + recordedType: 'confirm', + recordedMessage: text, + recordedResult: result, + frameLocation: frameLocation, + }, + '*' + ) + return result + } + } + + window.alert = function(text) { + if (document.body.hasAttribute('SideeXPlayingFlag')) { + recordedAlert = text + // Response directly + window.top.postMessage( + { + direction: 'from-page-script', + response: 'alert', + value: recordedAlert, + }, + '*' + ) + return + } else { + let result = originalAlert(text) + let frameLocation = getFrameLocation() + window.top.postMessage( + { + direction: 'from-page-script', + recordedType: 'alert', + recordedMessage: text, + recordedResult: result, + frameLocation: frameLocation, + }, + '*' + ) + return result + } + } +} else { + // top window + + window.prompt = function(text, defaultText) { + recordedPrompt = text + if (document.body.hasAttribute('setPrompt')) { + document.body.removeAttribute('setPrompt') + return nextPromptResult + } else { + let result = originalPrompt(text, defaultText) + let frameLocation = getFrameLocation() + window.top.postMessage( + { + direction: 'from-page-script', + recordedType: 'prompt', + recordedMessage: text, + recordedResult: result, + frameLocation: frameLocation, + }, + '*' + ) + return result + } + } + window.confirm = function(text) { + recordedConfirmation = text + if (document.body.hasAttribute('setConfirm')) { + document.body.removeAttribute('setConfirm') + return nextConfirmationResult + } else { + let result = originalConfirmation(text) + let frameLocation = getFrameLocation() + window.top.postMessage( + { + direction: 'from-page-script', + recordedType: 'confirm', + recordedMessage: text, + recordedResult: result, + frameLocation: frameLocation, + }, + '*' + ) + return result + } + } + window.alert = function(text) { + recordedAlert = text + if (document.body.hasAttribute('SideeXPlayingFlag')) { + // Response directly + window.top.postMessage( + { + direction: 'from-page-script', + response: 'alert', + value: recordedAlert, + }, + '*' + ) + return + } else { + let result = originalAlert(text) + let frameLocation = getFrameLocation() + window.top.postMessage( + { + direction: 'from-page-script', + recordedType: 'alert', + recordedMessage: text, + recordedResult: result, + frameLocation: frameLocation, + }, + '*' + ) + return result + } + } +} + +//play window methods +if (window == window.top) { + window.addEventListener('message', handler) +} + +function handler(event) { + if ( + event.source == window && + event.data && + event.data.direction == 'from-content-script' + ) { + if (event.data.detach) { + window.removeEventListener('message', handler) + window.prompt = originalPrompt + window.confirm = originalConfirmation + window.alert = originalAlert + return + } + let result = undefined + switch (event.data.command) { + case 'setNextPromptResult': + nextPromptResult = event.data.target + document.body.setAttribute('setPrompt', true) + window.postMessage( + { + direction: 'from-page-script', + response: 'prompt', + }, + '*' + ) + break + case 'getPromptMessage': + result = recordedPrompt + recordedPrompt = null + window.postMessage( + { + direction: 'from-page-script', + response: 'prompt', + value: result, + }, + '*' + ) + break + case 'setNextConfirmationResult': + nextConfirmationResult = event.data.target + document.body.setAttribute('setConfirm', true) + window.postMessage( + { + direction: 'from-page-script', + response: 'confirm', + }, + '*' + ) + break + case 'getConfirmationMessage': + result = recordedConfirmation + recordedConfirmation = null + try { + window.postMessage( + { + direction: 'from-page-script', + response: 'confirm', + value: result, + }, + '*' + ) + } catch (e) {} // eslint-disable-line no-empty + break + + case 'setNextAlertResult': + document.body.setAttribute('setAlert', true) + window.postMessage( + { + direction: 'from-page-script', + response: 'alert', + }, + '*' + ) + break + } + } +}