DevTools - inspector - data URL source links and their tooltips are unreadable

https://github.com/MoonchildProductions/moebius/pull/95
This commit is contained in:
janekptacijarabaci 2018-02-28 08:57:48 +01:00 committed by Roy Tam
commit 4d57ef767e
3 changed files with 44 additions and 14 deletions

View file

@ -140,11 +140,18 @@ Rule.prototype = {
line, mediaText}) => {
let mediaString = mediaText ? " @" + mediaText : "";
let linePart = line > 0 ? (":" + line) : "";
let decodedHref = href;
if (decodedHref) {
try {
decodedHref = decodeURIComponent(href);
} catch (e) {}
}
let sourceStrings = {
full: (href || CssLogic.l10n("rule.sourceInline")) + linePart +
full: (decodedHref || CssLogic.l10n("rule.sourceInline")) + linePart +
mediaString,
short: CssLogic.shortSource({href: href}) + linePart + mediaString
short: CssLogic.shortSource({href: decodedHref}) + linePart + mediaString
};
return sourceStrings;