Skip to content

Instantly share code, notes, and snippets.

View pavax's full-sized avatar

Patrick D. pavax

  • schaltstelle
  • Bern, Switzerland
View GitHub Profile
@pavax
pavax / SvgFixingDirective.ts
Last active November 10, 2019 07:28
Fixing fontawesome SVG mask, clip-path and fill url() values for the safari browser when using a base-href
import { AfterViewInit, Directive, ElementRef, Inject } from '@angular/core';
import { AbstractSubscriber } from '../../core/abstract-subscriber';
import { filter, startWith, takeUntil } from 'rxjs/operators';
import { NavigationEnd, Router } from '@angular/router';
import { APP_BASE_HREF, Location } from '@angular/common';
function isSafariBrowser() {
return navigator.vendor && navigator.vendor.indexOf('Apple') > -1 &&
navigator.userAgent &&
navigator.userAgent.indexOf('CriOS') === -1 &&
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">