Add search engine fallback leads to 404 Mycroft page

RESOLVED INVALID

Status

--
minor
RESOLVED INVALID
13 years ago
7 years ago

People

(Reporter: cameron, Assigned: cameron)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Assignee)

Description

13 years ago
http://www.mozilla.com/firefox/updated.html and http://www.mozilla.com/firefox/central/index.html 

Javascript appears to be have been copied from mycroft. Should just show an error alert instead of going to http://mycroft.mozdev.org/error.html

Related:  Bug 330272 for addons.mozilla.org. The patches will be the same general idea.

Steps to reproduce: Go to http://www.mozilla.com/firefox/central/index.html in Opera, Safari, IE, etc.
(Assignee)

Comment 1

13 years ago
I am NOT letting anyone else at this bug after spending far too long fiddling already! :)
Assignee: nobody → bugs.cameron
(Assignee)

Updated

13 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 2

13 years ago
Created attachment 225534 [details]
search-plugin.js

This is search-plugin.js from webtools/addons/public/htdocs/js/search-plugin.js

I don't know if there's a way you can make a "patch" to add a file.. but this is the file I want to add and I want to put it in /src/
(Assignee)

Comment 3

13 years ago
Created attachment 225536 [details] [diff] [review]
Makes pages point at one file, search-plugin.js (in root directory)

Changes:

-<script type="text/javascript">
-function errorMsg(name,ext,cat)
-{
-  // alert("Netscape 6 or Mozilla is needed to install a sherlock plugin");
-  f=document.createElement("form");
-  f.setAttribute("name","installform");
-  f.setAttribute("method","post");
-  f.setAttribute("action","http://mycroft.mozdev.org/error.html");
-  fe=document.createElement("input");
-  fe.setAttribute("type","hidden");
-  fe.setAttribute("name","name");
-  fe.setAttribute("value",name);
-  f.appendChild(fe);
-  fe=document.createElement("input");
-  fe.setAttribute("type","hidden");
-  fe.setAttribute("name","ext");
-  fe.setAttribute("value",ext);
-  f.appendChild(fe);
-  fe=document.createElement("input");
-  fe.setAttribute("type","hidden");
-  fe.setAttribute("name","cat");
-  fe.setAttribute("value",cat);
-  f.appendChild(fe);
-  document.getElementsByTagName("body")[0].appendChild(f);
-  if (document.installform) { 
-    document.installform.submit();
-  } else {
-    location.href="http://mycroft.mozdev.org/error.html"; //hack for DOM-incompatible browsers
-  }
-
-}
-function addEngine(name,ext,cat,type)
-{
- if ((typeof window.sidebar == "object") && (typeof
-window.sidebar.addSearchEngine == "function")) { 
-     window.sidebar.addSearchEngine(
-       "http://addons.mozilla.org/search-engines-static/"+name+".src",
-       "http://addons.mozilla.org/search-engines-static/"+name+"."+ext, name, cat );
- } else {
-   errorMsg(name,ext,cat);
- } 
-}
-
-</script>
+<script type="text/javascript" src="/search-plugin.js></script>

Same for both files. It's uglified up because the current files have windows line endings which they shouldn't (according to Reed.)
Attachment #225536 - Flags: review?
(Assignee)

Comment 4

13 years ago
Ah crap. Bitrotted. And now I don't know if I screwed the patch up or if I didn't or what was wrong. Anyway mozilla.com no longer has js to add search engines on it, so this is no longer a problem.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
(Assignee)

Updated

13 years ago
Attachment #225536 - Flags: review?
Component: www.mozilla.org/firefox → www.mozilla.org
Product: Websites → Websites
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in before you can comment on or make changes to this bug.