diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7a13c56..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.xpi -*.suo -*.sln \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000..b96df9f --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + FireRecord + + + + + + + + diff --git a/README.md b/README.md deleted file mode 100644 index e8f0e20..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -FireRecord -============ - -A firebug plugin which provides web automation to do automated testing or mundane tasks. -Developers: Peter Atechian, Rylan Doherty, David Westgate \ No newline at end of file diff --git a/TestJScripts.html b/TestJScripts.html deleted file mode 100644 index 2148d9e..0000000 --- a/TestJScripts.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - This is the title of the document -
-
- This is the header
- -
-
- -
- -
- -
-
table headingTable Cell
-

Level 1 Heading

-
- Anchor
- This is an object that normally holds a video but I'm too lazy to find one
- This is a menu -
-
-

This is a paragraph

-
- This is a quotation
- This is a summary
-
- -
-
-
-
-
-
- -
-
-
    -
  1. list item
  2. -
-
div
- - - - diff --git a/analyze.js b/analyze.js deleted file mode 100644 index e1426d1..0000000 --- a/analyze.js +++ /dev/null @@ -1,120 +0,0 @@ -function analyze() { - var all = document.getElementsByTagName("*"); - for (var i = 0; i < all.length; ++i) { - var info = new Array(); - var validtags = ["A", "BUTTON", "FORM", "IMG", "INPUT", "LINK", "OPTION", "SELECT", "TABLE", "TEXTAREA"]; - if (validtags.indexOf(all[i].tagName) < 0) continue; - info[0] = all[i].tagName; - switch (info[0]) { - case "INPUT": - info[1] = all[i].getAttribute("type"); - break; - case "A": - info[1] = all[i].getAttribute("href"); - break; - case "BUTTON": - info[1] = all[i].getAttribute("name"); - info[2] = all[i].getAttribute("type"); - info[3] = all[i].getAttribute("value"); - info[4] = all[i].getAttribute("form"); - break; - case "FORM": - info[1] = all[i].getAttribute("name"); - info[2] = all[i].getAttribute("length"); - info[3] = all[i].getAttribute("target"); - info[4] = all[i].getAttribute("action"); - break; - case "IMG": - info[1] = all[i].getAttribute("name"); - info[2] = all[i].getAttribute("src"); - info[3] = all[i].getAttribute("align"); - break; - case "INPUT": - info[1] = all[i].getAttribute("name"); - info[2] = all[i].getAttribute("type"); - info[3] = all[i].getAttribute("value"); - break; - case "LINK": - info[1] = all[i].getAttribute("href"); - info[2] = all[i].getAttribute("type"); - info[3] = all[i].getAttribute("charset"); - break; - case "OPTION": - info[1] = all[i].getAttribute("text"); - info[2] = all[i].getAttribute("value"); - info[3] = all[i].getAttribute("index"); - break; - case "SELECT": - info[1] = all[i].getAttribute("type"); - info[2] = all[i].getAttribute("name"); - info[3] = all[i].getAttribute("size"); - break; - case "TABLE": - info[1] = all[i].getAttribute("summmary"); - info[2] = all[i].getAttribute("caption"); - break; - case "TEXTAREA": - info[1] = all[i].getAttribute("name"); - info[2] = all[i].getAttribute("type"); - info[3] = all[i].getAttribute("value"); - break; - - } - generatescript(info); - } -} -function generatescript(info) { - var command; - switch (info[0]) { - case "A": - command = "window.location.href = '" + info[1] + "';" - break; - case "BUTTON": - command = "button.name = '" + info[1] + "';" - + "button.type = '" + info[2] + "';" - + "button.value = '" + info[3] + "';" - + "button.form = '" + info[4] + "';"; - break; - case "FORM": - command = "form.name = '" + info[1] + "';" - + "form.length = '" + info[2] + "';" - + "form.target = '" + info[3] + "';" - + "form.action = '" + info[4] + "';"; - break; - case "IMG": - command = "img.name = '" + info[1] + "';" - + "img.src = '" + info[2] + "';" - + "img.align = '" + info[3] + "';"; - break; - case "INPUT": - command = "input.name = '" + info[1] + "';" - + "input.type = '" + info[2] + "';" - + "input.value = '" + info[3] + "';"; - break; - case "LINK": - command = "link.href = '" + info[1] + "';" - + "link.type = '" + info[2] + "';" - + "link.charset = '" + info[3] + "';"; - break; - case "OPTION": - command = "option.text = '" + info[1] + "';" - + "option.value = '" + info[2] + "';" - + "option.index = '" + info[3] + "';"; - break; - case "SELECT": - command = "select.type = '" + info[1] + "';" - + "select.name = '" + info[2] + "';" - + "select.size = '" + info[3] + "';"; - break; - case "TABLE": - command = "table.summary = '" + info[1] + "';" - + "table.caption = '" + info[2] + "';"; - break; - case "TEXTAREA": - command = "window.location.name = '" + info[1] + "';" - + "table.type = '" + info[2] + "';" - + "table.value = '" + info[3] + "';"; - break; - } - alert(command); -} diff --git a/assemble.bat b/assemble.bat deleted file mode 100644 index 3297acf..0000000 --- a/assemble.bat +++ /dev/null @@ -1,9 +0,0 @@ -if exist "C:\Program Files\7-Zip\7z.exe" ( - "C:\Program Files\7-Zip\7z.exe" a FireRecord.zip chrome defaults chrome.manifest install.rdf -) else if exist "C:\Program Files (x86)\7-Zip\7z.exe" ( - "C:\Program Files (x86)\7-Zip\7z.exe" a FireRecord.zip chrome defaults chrome.manifest install.rdf -) else ( - "C:\Program Files\WinRAR\rar.exe" a FireRecord.zip chrome defaults chrome.manifest install.rdf -) -move FireRecord.zip FireRecord.xpi -start "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" FireRecord.xpi diff --git a/chrome.manifest b/chrome.manifest index c7e5f9c..308bd66 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -1,3 +1,8 @@ -content firerecord chrome/content/ -skin firerecord classic/1.0 chrome/skin/classic/ -overlay chrome://firebug/content/firebugOverlay.xul chrome://firerecord/content/firerecord.xul +content firerecord chrome/content/ +content firerecord chrome/content/ contentaccessible=yes +overlay chrome://browser/content/browser.xul chrome://firerecord/content/browserx.xul + +locale firerecord en-US locale/en-US/ + +skin firerecord classic/1.0 skin/ +style chrome://global/content/customizeToolbar.xul chrome://firerecord/skin/skin.css \ No newline at end of file diff --git a/chrome/content/browserx.xul b/chrome/content/browserx.xul new file mode 100644 index 0000000..7b07092 --- /dev/null +++ b/chrome/content/browserx.xul @@ -0,0 +1,43 @@ + + + + + - - This is the title of the document -
-
- This is the header
- -
-
- -
- -
- -
-
table headingTable Cell
-

Level 1 Heading

-
- Anchor
- This is an object that normally holds a video but I'm too lazy to find one
- This is a menu -
-
-

This is a paragraph

-
- This is a quotation
- This is a summary
-
- -
-
-
-
-
-
- -
-
-
    -
  1. list item
  2. -
-
div
- - - - diff --git a/listener.js b/listener.js deleted file mode 100644 index 209fc2a..0000000 --- a/listener.js +++ /dev/null @@ -1,27 +0,0 @@ -var spans = document.getElementsByTagName("*"); -if (window.attachEvent) { window.attachEvent('onload', your_function); } -else if (window.addEventListener) { window.addEventListener('load', your_function, false); } -else { document.addEventListener('load', your_function, false); } -for (i = 0; i < spans.length; i++) - spans[i].addEventListener("click", this.doSomething); -function your_function() { - alert("Done Loading!"); -} -function doSomething(e) { - var targ; - if (!e) { - var e = window.event; - } - if (e.target) { - targ = e.target; - } - else if (e.srcElement) { - targ = e.srcElement; - } - var tname; - var idname; - - idname = targ.id; - tname = targ.tagName; - alert("You clicked on a " + tname + " element. Named " + idname + "."); -} diff --git a/locale.xpi b/locale.xpi new file mode 100644 index 0000000..8983b22 Binary files /dev/null and b/locale.xpi differ diff --git a/locale/en-US/translations.dtd b/locale/en-US/translations.dtd new file mode 100644 index 0000000..a42a829 --- /dev/null +++ b/locale/en-US/translations.dtd @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/scriptapi.js b/scriptapi.js deleted file mode 100644 index eb841bb..0000000 --- a/scriptapi.js +++ /dev/null @@ -1,14 +0,0 @@ -function script_fire_event(element, type) { - //Todo - https://developer.mozilla.org/en-US/docs/DOM/document.createEvent - if (element.fireEvent) { - element.fireEvent('on' + type); - } else { - var obj = document.createEvent('Event'); - obj.initEvent(type, true, true); - element.dispatchEvent(obj); - } -} -function script_find_element(id) { - //Todo - Add parameters for rest of stuff - return document.getElementById(id); -} \ No newline at end of file diff --git a/skin/skin.css b/skin/skin.css new file mode 100644 index 0000000..86e7871 --- /dev/null +++ b/skin/skin.css @@ -0,0 +1,12 @@ +#link-target-finder-toolbar-button { + list-style-image: url("chrome://firerecord/skin/toolbar-large.png"); +} + +#link-target-finder-status-bar-icon { + width: 83px; + margin: 0 5px; +} + +.link-target-finder-selected { + outline: 2px solid CadetBlue !important; +} \ No newline at end of file diff --git a/skin/status-bar.png b/skin/status-bar.png new file mode 100644 index 0000000..63418fa Binary files /dev/null and b/skin/status-bar.png differ diff --git a/skin/toolbar-large.png b/skin/toolbar-large.png new file mode 100644 index 0000000..1b33180 Binary files /dev/null and b/skin/toolbar-large.png differ diff --git a/testscript.html b/testscript.html deleted file mode 100644 index 2ac472c..0000000 --- a/testscript.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Test - - - - -

This will be clicked by the script

-

Test the script

- -