File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ Card {
12
12
anchors .verticalCenter : parent .verticalCenter
13
13
anchors .margins : parent .width * 0.1
14
14
15
+ function stripHttpsIfWin (url ) {
16
+
17
+ var httpsPrefix = ' https://'
18
+ if (Qt .platform .os === ' windows' && url .startsWith (httpsPrefix)) {
19
+ return ' http://' + url .substring (httpsPrefix .length );
20
+ }
21
+ return url;
22
+ }
23
+
15
24
function fetchNews () {
16
25
var news = new XMLHttpRequest ();
17
26
news .onreadystatechange = function () {
22
31
var object = component .createObject (swipe);
23
32
var post = newsObj[' posts' ][i];
24
33
if (post[' thumbnail_images' ]) {
25
- object .source = Qt .resolvedUrl (post[' thumbnail_images' ][' medium' ][' url' ]);
34
+ object .source = Qt .resolvedUrl (stripHttpsIfWin ( post[' thumbnail_images' ][' medium' ][' url' ]) );
26
35
}
27
36
object .cardTitle = post[' title_plain' ];
28
37
object .summary = post[' excerpt' ];
You can’t perform that action at this time.
0 commit comments