Created
May 13, 2022 17:58
-
-
Save jdlrobson/63d6ee521aa7ba0ded5395992e671338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/extension.json b/extension.json | |
index 7abe13ead..b023ebcfb 100644 | |
--- a/extension.json | |
+++ b/extension.json | |
@@ -835,7 +835,7 @@ | |
}, | |
"MFSearchAPIParams": { | |
"value": { | |
- "ppprop": "displaytitle" | |
+ "wbetterms": "label" | |
} | |
}, | |
"MFQueryPropModules": { | |
@@ -845,8 +845,8 @@ | |
}, | |
"MFSearchGenerator": { | |
"value": { | |
- "name": "prefixsearch", | |
- "prefix": "ps" | |
+ "name": "wbsearch", | |
+ "prefix": "wbs" | |
} | |
}, | |
"MFMinCachedPageSize": { | |
diff --git a/src/mobile.startup/search/SearchGateway.js b/src/mobile.startup/search/SearchGateway.js | |
index df80d7870..ed44d5b86 100644 | |
--- a/src/mobile.startup/search/SearchGateway.js | |
+++ b/src/mobile.startup/search/SearchGateway.js | |
@@ -35,7 +35,8 @@ SearchGateway.prototype = { | |
getApiData: function ( query ) { | |
var prefix = this.generator.prefix, | |
data = extendSearchParams( 'search', { | |
- generator: this.generator.name | |
+ generator: this.generator.name, | |
+ origin: '*' | |
} ); | |
data.redirects = ''; | |
@@ -155,7 +156,9 @@ SearchGateway.prototype = { | |
self = this; | |
if ( !this.isCached( query ) ) { | |
- xhr = this.api.get( this.getApiData( query ) ); | |
+ xhr = this.api.get( this.getApiData( query ), { | |
+ url: 'https://www.wikidata.org/w/api.php' | |
+ } ); | |
request = xhr | |
.then( function ( data ) { | |
// resolve the Deferred object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment