Skip to content

Commit

Permalink
Clean up the console warninf message
Browse files Browse the repository at this point in the history
  • Loading branch information
jelveh committed Apr 24, 2024
1 parent aef6df0 commit c9e8207
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/puter-js/src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function initXhr(endpoint, APIOrigin, authToken, method= "post", contentType = "
xhr.open(method, APIOrigin + endpoint, true);
xhr.setRequestHeader("Authorization", "Bearer " + authToken);
xhr.setRequestHeader("Content-Type", contentType);
xhr.responseType = responseType;
xhr.responseType = responseType ?? '';
return xhr;
}

Expand Down
2 changes: 1 addition & 1 deletion src/UI/UIWindowFontPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function UIWindowFontPicker(options){
h += `<div style="padding: 20px; border-bottom: 1px solid #ced7e1; width: 100%; box-sizing: border-box;">`;
h += `<div class="font-list" style="margin-bottom: 10px; height: 200px; overflow-y: scroll; background-color: white; padding: 0 10px;">`;
fontAvailable.forEach(element => {
h += `<p class="font-selector disable-user-select ${options.default === element ? 'font-selector-active' : ''}" style="font-family: '${html_encode(element)}';" data-font-family="${html_encode(element)}">${element}</p>`; // 👉️ one, two, three, four
h += `<p class="font-selector disable-user-select ${options.default === element ? 'font-selector-active' : ''}" style="font-family: '${html_encode(element)}';" data-font-family="${html_encode(element)}">${html_encode(element)}</p>`; // 👉️ one, two, three, four
});
h += `</div>`;

Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ window.loadCSS = async function(url) {
document.head.appendChild(link);
});
}
console.log( "%c⚠️Warning⚠️\n %cPlease refrain from adding or pasting any sort of code here, as doing so could potentially compromise your account. \nYou don't get what you intended anyway, but the hacker will !! \n\n%cfor further information please visit https://developer.chrome.com/blog/self-xss",
"color:red; font-size:2rem;margin-left:40%;font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;",
console.log( "%c⚠️Warning⚠️\n%cPlease refrain from adding or pasting any sort of code here, as doing so could potentially compromise your account. \nYou don't get what you intended anyway, but the hacker will! \n\n%cFor further information please visit https://developer.chrome.com/blog/self-xss",
"color:red; font-size:2rem; display:block; margin-left:0; margin-bottom: 20px; background: black; width: 100%; margin-top:20px; font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;",
"font-size:1rem; font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;",
"font-size:0.9rem; font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;"
);
"font-size:0.9rem; font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;",
);

0 comments on commit c9e8207

Please sign in to comment.