parent
222f1f19a1
commit
28a694e17c
|
|
@ -230,6 +230,10 @@ Fixed
|
|||
- A bug in QtWebEngine 5.15.2 causes "renderer process killed" errors on
|
||||
websites like LinkedIn and TradingView. There is now a workaround in qutebrowser
|
||||
to prevent this from happening.
|
||||
- Nextcloud Calendars started using `String.replaceAll` which was only added to
|
||||
Chromium recently (Chrome 85), so won't work with current QtWebEngine
|
||||
versions. This release includes a workaround (a polyfill as a
|
||||
site-specific-quirk).
|
||||
|
||||
v1.14.1 (2020-12-04)
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -1144,6 +1144,13 @@ class _WebEngineScripts(QObject):
|
|||
QWebEngineScript.DocumentReady,
|
||||
QWebEngineScript.ApplicationWorld,
|
||||
),
|
||||
# FIXME not needed with 5.15.3 most likely, but how do we check for
|
||||
# that?
|
||||
(
|
||||
'string_replaceall',
|
||||
QWebEngineScript.DocumentCreation,
|
||||
QWebEngineScript.MainWorld,
|
||||
),
|
||||
]
|
||||
if not qtutils.version_check('5.13'):
|
||||
quirks.append(('globalthis',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
// Based on: https://vanillajstoolkit.com/polyfills/stringreplaceall/
|
||||
/* eslint-disable no-extend-native */
|
||||
|
||||
/**
|
||||
* String.prototype.replaceAll() polyfill
|
||||
* https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/
|
||||
* @author Chris Ferdinandi
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
if (!String.prototype.replaceAll) {
|
||||
String.prototype.replaceAll = function(str, newStr) {
|
||||
// If a regex pattern
|
||||
if (Object.prototype.toString.call(str).toLowerCase() === "[object regexp]") {
|
||||
return this.replace(str, newStr);
|
||||
}
|
||||
|
||||
// If a string
|
||||
return this.replace(new RegExp(str, "g"), newStr);
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue