Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 28 additions & 26 deletions src/templates/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,34 @@
<title>DevPath — Find Projects Based On Your Skills</title>

<script>
window.addEventListener('error', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '0';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'red';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'JS ERROR: ' + e.message + ' at ' + e.filename + ':' + e.lineno;
document.body.appendChild(errDiv);
});
window.addEventListener('unhandledrejection', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '50px';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'orange';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'PROMISE REJECTION: ' + (e.reason ? e.reason.message : e.reason);
document.body.appendChild(errDiv);
});
if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
window.addEventListener('error', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '0';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'red';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'JS ERROR: ' + e.message + ' at ' + e.filename + ':' + e.lineno;
document.body.appendChild(errDiv);
});
window.addEventListener('unhandledrejection', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '50px';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'orange';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'PROMISE REJECTION: ' + (e.reason ? e.reason.message : e.reason);
document.body.appendChild(errDiv);
});
}
</script>

<!-- Open Graph meta tags for social media sharing -->
Expand Down
54 changes: 28 additions & 26 deletions src/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,34 @@
<title>DevPath — Find Projects Based On Your Skills</title>

<script>
window.addEventListener('error', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '0';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'red';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'JS ERROR: ' + e.message + ' at ' + e.filename + ':' + e.lineno;
document.body.appendChild(errDiv);
});
window.addEventListener('unhandledrejection', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '50px';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'orange';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'PROMISE REJECTION: ' + (e.reason ? e.reason.message : e.reason);
document.body.appendChild(errDiv);
});
if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
window.addEventListener('error', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '0';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'red';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'JS ERROR: ' + e.message + ' at ' + e.filename + ':' + e.lineno;
document.body.appendChild(errDiv);
});
window.addEventListener('unhandledrejection', function(e) {
var errDiv = document.createElement('div');
errDiv.style.position = 'fixed';
errDiv.style.top = '50px';
errDiv.style.left = '0';
errDiv.style.width = '100%';
errDiv.style.background = 'orange';
errDiv.style.color = 'white';
errDiv.style.zIndex = '999999';
errDiv.style.padding = '20px';
errDiv.textContent = 'PROMISE REJECTION: ' + (e.reason ? e.reason.message : e.reason);
document.body.appendChild(errDiv);
});
}
</script>

<!-- Open Graph meta tags for social media sharing -->
Expand Down
Loading