Closed
Bug 336366
Opened 20 years ago
Closed 20 years ago
Add search engine fallback leads to 404 Mycroft page
Categories
(www.mozilla.org :: General, defect)
www.mozilla.org
General
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: cameron, Assigned: cameron)
References
()
Details
Attachments
(2 files)
|
478 bytes,
text/plain
|
Details | |
|
21.48 KB,
patch
|
Details | Diff | Splinter Review |
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.
I am NOT letting anyone else at this bug after spending far too long fiddling already! :)
Assignee: nobody → bugs.cameron
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/
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?
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
Closed: 20 years ago
Resolution: --- → INVALID
Attachment #225536 -
Flags: review?
Updated•14 years ago
|
Component: www.mozilla.org/firefox → www.mozilla.org
Updated•14 years ago
|
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.
Description
•