Skip to content

Commit

Permalink
fix regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Artaud committed Jan 21, 2019
1 parent a1d6499 commit 0ebb6aa
Show file tree
Hide file tree
Showing 6 changed files with 681 additions and 13 deletions.
14 changes: 11 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{%- include google-analytics.html -%}
{%- endif -%}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="/assets/js/findAndReplaceDOMText.js"></script>
<script>
$(document).ready(function () {
handleUrlParams()
Expand Down Expand Up @@ -52,9 +53,12 @@

function makeSiteUserFacing(appName) {
// Turn all [your app] mentions into specific app
$('p').each(function (index,el) {
el.innerHTML = el.innerHTML.replace(/your app/gi, appName);
});
findAndReplaceDOMText(document.body, {
find: new RegExp('[\\[ ]your app[.,?! \\]]', 'gi'),
replace: " " + appName + " ",
preset: 'prose'
}
);

// Hide Story and Dev solution section + hide menu
$('#vendor-menu').hide()
Expand All @@ -64,8 +68,12 @@
$('#developer-solution-section').hide()
$('#badge-section').hide()
$('#customization-links').hide()

$('#user-solution-title').contents().last()[0].textContent=' Solution'
}



function persistUrlParameters() {
urlParams = new URLSearchParams(window.location.search)

Expand Down
14 changes: 11 additions & 3 deletions _site/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/assets/main.css">
<link rel="stylesheet" href="/assets/css/style.css"><link type="application/atom+xml" rel="alternate" href="https://dontkillmyapp.com/feed.xml" title="Don't kill my app!" /><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="/assets/js/findAndReplaceDOMText.js"></script>
<script>
$(document).ready(function () {
handleUrlParams()
Expand Down Expand Up @@ -59,9 +60,12 @@

function makeSiteUserFacing(appName) {
// Turn all [your app] mentions into specific app
$('p').each(function (index,el) {
el.innerHTML = el.innerHTML.replace(/your app/gi, appName);
});
findAndReplaceDOMText(document.body, {
find: new RegExp('[\\[ ]your app[.,?! \\]]', 'gi'),
replace: " " + appName + " ",
preset: 'prose'
}
);

// Hide Story and Dev solution section + hide menu
$('#vendor-menu').hide()
Expand All @@ -71,8 +75,12 @@
$('#developer-solution-section').hide()
$('#badge-section').hide()
$('#customization-links').hide()

$('#user-solution-title').contents().last()[0].textContent=' Solution'
}



function persistUrlParameters() {
urlParams = new URLSearchParams(window.location.search)

Expand Down
2 changes: 1 addition & 1 deletion _site/feed.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="https://dontkillmyapp.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://dontkillmyapp.com/" rel="alternate" type="text/html" /><updated>2019-01-21T14:45:21+01:00</updated><id>https://dontkillmyapp.com/feed.xml</id><title type="html">Don’t kill my app!</title><subtitle>Hey Android vendors, don't kill my app!</subtitle><entry><title type="html">Welcome to Jekyll my ass!</title><link href="https://dontkillmyapp.com/jekyll/update/2018/12/19/welcome-to-jekyll.html" rel="alternate" type="text/html" title="Welcome to Jekyll my ass!" /><published>2018-12-19T07:28:35+01:00</published><updated>2018-12-19T07:28:35+01:00</updated><id>https://dontkillmyapp.com/jekyll/update/2018/12/19/welcome-to-jekyll</id><content type="html" xml:base="https://dontkillmyapp.com/jekyll/update/2018/12/19/welcome-to-jekyll.html">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="https://dontkillmyapp.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://dontkillmyapp.com/" rel="alternate" type="text/html" /><updated>2019-01-21T15:58:18+01:00</updated><id>https://dontkillmyapp.com/feed.xml</id><title type="html">Don’t kill my app!</title><subtitle>Hey Android vendors, don't kill my app!</subtitle><entry><title type="html">Welcome to Jekyll my ass!</title><link href="https://dontkillmyapp.com/jekyll/update/2018/12/19/welcome-to-jekyll.html" rel="alternate" type="text/html" title="Welcome to Jekyll my ass!" /><published>2018-12-19T07:28:35+01:00</published><updated>2018-12-19T07:28:35+01:00</updated><id>https://dontkillmyapp.com/jekyll/update/2018/12/19/welcome-to-jekyll</id><content type="html" xml:base="https://dontkillmyapp.com/jekyll/update/2018/12/19/welcome-to-jekyll.html">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;To add new posts, simply add a file in the &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory that follows the convention &lt;code class=&quot;highlighter-rouge&quot;&gt;YYYY-MM-DD-name-of-post.ext&lt;/code&gt; and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

Expand Down
14 changes: 11 additions & 3 deletions _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/assets/main.css">
<link rel="stylesheet" href="/assets/css/style.css"><link type="application/atom+xml" rel="alternate" href="https://dontkillmyapp.com/feed.xml" title="Don't kill my app!" /><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="/assets/js/findAndReplaceDOMText.js"></script>
<script>
$(document).ready(function () {
handleUrlParams()
Expand Down Expand Up @@ -59,9 +60,12 @@

function makeSiteUserFacing(appName) {
// Turn all [your app] mentions into specific app
$('p').each(function (index,el) {
el.innerHTML = el.innerHTML.replace(/your app/gi, appName);
});
findAndReplaceDOMText(document.body, {
find: new RegExp('[\\[ ]your app[.,?! \\]]', 'gi'),
replace: " " + appName + " ",
preset: 'prose'
}
);

// Hide Story and Dev solution section + hide menu
$('#vendor-menu').hide()
Expand All @@ -71,8 +75,12 @@
$('#developer-solution-section').hide()
$('#badge-section').hide()
$('#customization-links').hide()

$('#user-solution-title').contents().last()[0].textContent=' Solution'
}



function persistUrlParameters() {
urlParams = new URLSearchParams(window.location.search)

Expand Down
14 changes: 11 additions & 3 deletions _site/jekyll/update/2018/12/19/welcome-to-jekyll.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/assets/main.css">
<link rel="stylesheet" href="/assets/css/style.css"><link type="application/atom+xml" rel="alternate" href="https://dontkillmyapp.com/feed.xml" title="Don't kill my app!" /><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="/assets/js/findAndReplaceDOMText.js"></script>
<script>
$(document).ready(function () {
handleUrlParams()
Expand Down Expand Up @@ -61,9 +62,12 @@

function makeSiteUserFacing(appName) {
// Turn all [your app] mentions into specific app
$('p').each(function (index,el) {
el.innerHTML = el.innerHTML.replace(/your app/gi, appName);
});
findAndReplaceDOMText(document.body, {
find: new RegExp('[\\[ ]your app[.,?! \\]]', 'gi'),
replace: " " + appName + " ",
preset: 'prose'
}
);

// Hide Story and Dev solution section + hide menu
$('#vendor-menu').hide()
Expand All @@ -73,8 +77,12 @@
$('#developer-solution-section').hide()
$('#badge-section').hide()
$('#customization-links').hide()

$('#user-solution-title').contents().last()[0].textContent=' Solution'
}



function persistUrlParameters() {
urlParams = new URLSearchParams(window.location.search)

Expand Down
Loading

0 comments on commit 0ebb6aa

Please sign in to comment.