Skip to content

Commit 016a574

Browse files
fix(posts): remove 404 replit links
* At _site/blog/2018/11/17/mock-window-location/index.html:220: External link https://replit.com/@remarkablemark/Jest-mock-windowlocation failed (status code 404) * At _site/blog/2019/09/20/es-modules/index.html:162: External link https://replit.com/@remarkablemark/ES-modules failed (status code 404) * At _site/blog/2019/09/27/socketio-quickstart/index.html:235: External link https://replit.com/@remarkablemark/socketio-quickstart#package.json failed (status code 404) * At _site/blog/2020/11/23/style-to-js/index.html:169: External link https://replit.com/@remarkablemark/style-to-js failed (status code 404) * At _site/blog/2021/01/08/replit-url-shortener/index.html:134: External link https://replit.com/@remarkablemark/URL-Shortener#package.json failed (status code 404) * At _site/blog/2021/01/08/replit-url-shortener/index.html:151: External link https://replit.com/@remarkablemark/URL-Shortener#package.json failed (status code 404) * At _site/blog/2021/01/18/html-draggable/index.html:209: External link https://replit.com/@remarkablemark/HTML-draggable failed (status code 404) * At _site/blog/2021/01/23/drag-and-drop-image-to-webpage/index.html:238: External link https://replit.com/@remarkablemark/HTML-drag-and-drop-image failed (status code 404) * At _site/blog/2021/04/05/nodejs-filename-with-trailing-slash/index.html:171: External link https://replit.com/@remarkablemark/Nodejs-filename-with-trailing-slash failed (status code 404) * At _site/blog/2021/04/13/replit-run-mocha-test/index.html:146: External link https://replit.com/@remarkablemark/Mocha#package.json failed (status code 404) * At _site/blog/2021/04/14/jest-mock-window-location-href/index.html:194: External link https://replit.com/@remarkablemark/Jest-mock-windowlocationhref#jest-mock-window-location-href.test.js failed (status code 404) * At _site/blog/2021/10/16/yargs-command-with-positional-argument/index.html:189: External link https://replit.com/@remarkablemark/yargs-command-with-positional-argument#index.js failed (status code 404) * At _site/blog/2021/12/05/python-generate-random-word-or-letter/index.html:180: External link https://replit.com/@remarkablemark/random-alphabet-letter#main.py failed (status code 404) * At _site/blog/2023/01/29/typedoc-plugin-copy-code-to-clipboard/index.html:172: External link https://replit.com/@remarkablemark/Copy-code-to-clipboard failed (status code 404) * At _site/blog/2023/03/31/confirm-before-form-submit/index.html:190: External link https://replit.com/@remarkablemark/Confirm-before-form-submit#index.html failed (status code 404)
1 parent 50586cb commit 016a574

14 files changed

Lines changed: 5 additions & 114 deletions

_posts/2018/2018-11-17-mock-window-location.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,3 @@ describe('window.location', () => {
9696
The [gist](https://gist.github.com/remarkablemark/5cb571a13a6635ab89cf2bb47dc004a3) that inspired this post:
9797

9898
{% gist 5cb571a13a6635ab89cf2bb47dc004a3 %}
99-
100-
### Replit
101-
102-
Run the test in this [replit.com](https://replit.com/@remarkablemark/Jest-mock-windowlocation):
103-
104-
<iframe height="400px" width="100%" src="https://replit.com/@remarkablemark/Jest-mock-windowlocation?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

_posts/2019/2019-09-20-es-modules.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,3 @@ As you can tell in both examples, the `<script>` tag must have the attribute `ty
3333
## Browser Support
3434

3535
You can find the browser support [here](https://caniuse.com/#feat=es6-module).
36-
37-
## Demo
38-
39-
See the [Replit](https://replit.com/@remarkablemark/ES-modules) demo:
40-
41-
<iframe height="400px" width="100%" src="https://replit.com/@remarkablemark/ES-modules?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

_posts/2019/2019-09-27-socketio-quickstart.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This post goes over how to get started with [Socket.IO](https://socket.io/):
1111

1212
- [Express](#express)
1313
- [Socket.IO](#socketio)
14-
- [Demo](#demo)
1514

1615
## Express
1716

@@ -114,9 +113,3 @@ node index.js
114113
Refresh the page to see messages show up in your browser and terminal console.
115114

116115
You can start [sending and receiving events](https://socket.io/docs/v4/emitting-events/)!
117-
118-
## Demo
119-
120-
[Replit](https://replit.com/@remarkablemark/socketio-quickstart#package.json) example:
121-
122-
<iframe height="400px" width="100%" src="https://replit.com/@remarkablemark/socketio-quickstart?lite=true#package.json" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

_posts/2020/2020-11-23-style-to-js.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,3 @@ Output:
4343
```
4444

4545
See [README](https://github.com/remarkablemark/style-to-js#readme).
46-
47-
## Demo
48-
49-
[Replit](https://replit.com/@remarkablemark/style-to-js):
50-
51-
<iframe height="600px" width="100%" src="https://replit.com/@remarkablemark/style-to-js?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>
52-
53-
## Misc
54-
55-
Use [`style-to-object`](https://b.remarkabl.org/style-to-object) to parse a CSS inline style to a JavaScript object that's kebab-cased.
56-
57-
```sh
58-
npm install style-to-object
59-
```
60-
61-
Parse:
62-
63-
```js
64-
const styleToObject = require('style-to-object');
65-
66-
styleToObject('background-color: #BADA55');
67-
```
68-
69-
Output:
70-
71-
```json
72-
{ "background-color": "#BADA55" }
73-
```
74-
75-
See [README](https://github.com/remarkablemark/style-to-object#readme).

_posts/2021/2021-01-08-replit-url-shortener.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ excerpt: Demo of a Replit URL shortener built with Node.js.
66
categories: replit nodejs express
77
---
88

9-
[Replit](https://replit.com/@remarkablemark/URL-Shortener#package.json):
10-
11-
<iframe height="600px" width="100%" src="https://replit.com/@remarkablemark/URL-Shortener?lite=true#package.json" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>
12-
139
A [URL shortener](https://wikipedia.org/wiki/URL_shortening) is a service that converts a long URL to a short URL. When a user goes to the short URL, the server redirects to the long URL. An example of a URL shortener is [TinyURL](https://tinyurl.com/).
1410

1511
This was built on [Node.js](https://nodejs.org/) with the dependencies:
@@ -20,5 +16,4 @@ This was built on [Node.js](https://nodejs.org/) with the dependencies:
2016

2117
Resources:
2218

23-
- [Replit](https://replit.com/@remarkablemark/URL-Shortener#package.json)
2419
- [GitHub repository](https://github.com/remarkablemark/Replit-URL-Shortener)

_posts/2021/2021-01-18-html-draggable.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ document
8787
});
8888
```
8989

90-
## Demo
91-
92-
[Replit](https://replit.com/@remarkablemark/HTML-draggable):
93-
94-
<iframe height="600px" width="100%" src="https://replit.com/@remarkablemark/HTML-draggable?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>
95-
9690
## Links
9791

9892
- [W3docs](https://www.w3docs.com/learn-html/html-draggable-attribute.html)

_posts/2021/2021-01-23-drag-and-drop-image-to-webpage.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Highlight the dropzone when the [`dragenter`](https://developer.mozilla.org/docs
4444

4545
<script>
4646
// ...
47-
dropzone.addEventListener('dragenter', event => {
47+
dropzone.addEventListener('dragenter', (event) => {
4848
event.preventDefault();
4949
dropzone.classList.add('active');
5050
});
@@ -58,7 +58,7 @@ Remove the dropzone highlight when the [`dragleave`](https://developer.mozilla.o
5858
```html
5959
<script>
6060
// ...
61-
dropzone.addEventListener('dragleave', event => {
61+
dropzone.addEventListener('dragleave', (event) => {
6262
event.preventDefault();
6363
dropzone.classList.remove('active');
6464
});
@@ -70,7 +70,7 @@ It's necessary to handle the [`dragover`](https://developer.mozilla.org/docs/Web
7070
```html
7171
<script>
7272
// ...
73-
dropzone.addEventListener('dragover', event => {
73+
dropzone.addEventListener('dragover', (event) => {
7474
event.preventDefault();
7575
});
7676
</script>
@@ -81,7 +81,7 @@ Now handle the [`drop`](https://developer.mozilla.org/docs/Web/API/Document/drop
8181
```html
8282
<script>
8383
// ...
84-
dropzone.addEventListener('drop', event => {
84+
dropzone.addEventListener('drop', (event) => {
8585
event.preventDefault();
8686
dropzone.classList.remove('active');
8787
@@ -109,9 +109,3 @@ Here's a breakdown of what's happening:
109109
### Note
110110

111111
The `dragenter` and `dragleave` events aren't required for drag and drop to work. They are simply there to improve user experience.
112-
113-
## Demo
114-
115-
[Replit](https://replit.com/@remarkablemark/HTML-drag-and-drop-image):
116-
117-
<iframe height="600px" width="100%" src="https://replit.com/@remarkablemark/HTML-drag-and-drop-image?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

_posts/2021/2021-04-05-nodejs-filename-with-trailing-slash.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,3 @@ To [replace all](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glo
4242
const filename = 'try/catch/finally.txt'.replace(/\//g, '\u2215');
4343
require('fs').writeFileSync(filename);
4444
```
45-
46-
## Demo
47-
48-
[Replit](https://replit.com/@remarkablemark/Nodejs-filename-with-trailing-slash):
49-
50-
<iframe height="400px" width="100%" src="https://replit.com/@remarkablemark/Nodejs-filename-with-trailing-slash?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

_posts/2021/2021-04-13-replit-run-mocha-test.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,3 @@ run = "npx mocha"
1616
```
1717

1818
Click `Run` to run your Mocha tests!
19-
20-
## Demo
21-
22-
[Replit](https://replit.com/@remarkablemark/Mocha#package.json):
23-
24-
<iframe height="400px" width="100%" src="https://replit.com/@remarkablemark/Mocha?lite=true#package.json" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

_posts/2021/2021-04-14-jest-mock-window-location-href.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Full test example:
4343
// jest-mock-window-location-href.test.js
4444
const { location } = window;
4545
const getHrefSpy = jest.fn(() => 'example.com');
46-
const setHrefSpy = jest.fn(href => href);
46+
const setHrefSpy = jest.fn((href) => href);
4747

4848
beforeAll(() => {
4949
delete window.location;
@@ -64,9 +64,3 @@ afterAll(() => {
6464
window.location = location;
6565
});
6666
```
67-
68-
## Demo
69-
70-
[Replit](https://replit.com/@remarkablemark/Jest-mock-windowlocationhref#jest-mock-window-location-href.test.js):
71-
72-
<iframe height="400px" width="100%" src="https://replit.com/@remarkablemark/Jest-mock-windowlocationhref?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>

0 commit comments

Comments
 (0)