mirror of
https://github.com/NohamR/Code-to-PDF.git
synced 2026-05-24 19:58:50 +00:00
Update performance
This commit is contained in:
2
.github/CODEOWNERS
vendored
Normal file
2
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Remove Expect-CT header
|
||||
/.well-known/* -expect-ct
|
||||
@@ -5,10 +5,10 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Convert Code to PDF: Free Online Tool</title>
|
||||
<title>Convert Code to PDF Online: Free Tool for Programming Languages</title>
|
||||
|
||||
<meta name="description"
|
||||
content="Convert code to PDF online for free. Supports multiple programming languages and syntax highlighting themes.">
|
||||
content="Convert code to PDF online for free with our tool that supports multiple programming languages and syntax highlighting themes. Get started now!">
|
||||
<meta name="keywords"
|
||||
content="code to pdf, convert code to pdf, code converter, programming language converter, syntax highlighting, online converter">
|
||||
<meta name="author" content="Tarik Jaber">
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Roboto&display=swap" rel="stylesheet">
|
||||
<link defer href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Roboto&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" id="theme-style"
|
||||
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/github-dark.min.css">
|
||||
@@ -39,7 +39,7 @@
|
||||
<h1>
|
||||
Code to PDF
|
||||
<a href="https://github.com/tarikjaber/Code-to-PDF" target="_blank">
|
||||
<img src="images/github-mark-white.png" alt="GitHub" class="github-icon">
|
||||
<img src="images/github-mark-white.png" alt="GitHub Contribution Icon" class="github-icon">
|
||||
</a>
|
||||
</h1>
|
||||
<div class="options">
|
||||
|
||||
6
index.js
6
index.js
@@ -12,6 +12,12 @@ let selectedTheme = localStorage.getItem('theme') || 'github-dark';
|
||||
let codeText = localStorage.getItem('code') || 'console.log("Hello World")';
|
||||
|
||||
// Set up the initial state
|
||||
document.addEventListener('securitypolicyviolation', function (event) {
|
||||
if (event.violatedDirective === 'expect-ct') {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
themeStylesheet.setAttribute('href', getStylesheet(selectedTheme));
|
||||
themeSelector.value = selectedTheme;
|
||||
code.classList.add('hljs', `language-${selectedLanguage}`);
|
||||
|
||||
@@ -38,7 +38,7 @@ input {
|
||||
|
||||
button {
|
||||
border-width: 0;
|
||||
background-color: dodgerblue;
|
||||
background-color: #006ed9;
|
||||
color: white;
|
||||
padding: 6px;
|
||||
min-width: 120px;
|
||||
|
||||
Reference in New Issue
Block a user