Skip to content

Commit

Permalink
Update cal.html
Browse files Browse the repository at this point in the history
  • Loading branch information
vjasonacc authored May 3, 2024
1 parent c5924f8 commit 817f91a
Showing 1 changed file with 1 addition and 96 deletions.
97 changes: 1 addition & 96 deletions cal.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,99 +159,4 @@ <h1>Text Replace</h1>
'A': 'Button Alpha',
'B': 'Button Alpha',
'C': 'Button Alpha',
'D': 'Button Alpha',
'E':'exp',
'F': '鍵7 > 5 ➡️ 2',
'G': '鍵7 8 > 3',
'H': '鍵7 1 ➡️ 2',
'I': '數字1',
'J': ':10:',
'K': '鍵7 6 ➡️ 1',
'L': '數字1',
'M': '自己鍵鍵~=啊法',
'N': ':14:',
'O': '數字0',
'P': ':16:',
'Q': ':17:',
'R': '鍵7 6 ➡️ 3',
'S': '5',
'T': '鍵7 9 ➡️ 2',
'U': '鍵7 4 ➡️ 1',
'V': ':22:',
'W': ':23',
'X': '自己鍵鍵~=啊法',
'Y': '自己鍵鍵~=啊法',
'Z': ':26:'
};

var lines = inputText.toUpperCase().split('\n');
var output = '';
var count = 0;

for (var i = 0; i < lines.length; i++) {
var line = lines[i];
for (var j = 0; j < line.length; j++) {
var char = line[j];
if (replacements.hasOwnProperty(char)) {
output += char + ' > ' + replacements[char] + '\n';
count++;
}
}
}

if (count > 0) {
outputContainer.innerHTML = 'Thank you for using our program, there are a total of ' + count + ' lines output.<br><br>';
outputContainer.innerHTML += output.replace(/\n/g, '<br>');
} else {
outputContainer.innerHTML = 'No replacements found.';
}
}

function downloadOutput(filename, filetype) {
var outputText = document.getElementById('outputContainer').innerText;
var blob = new Blob([outputText], { type: filetype });

if (window.navigator && window.navigator.msSaveOrOpenBlob) {
// For IE browser
window.navigator.msSaveOrOpenBlob(blob, filename);
} else {
// For other browsers
var link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
}

function downloadInput(filename, filetype) {
var inputText = document.getElementById('inputText').value;
var blob = new Blob([inputText], { type: filetype });

if (window.navigator && window.navigator.msSaveOrOpenBlob) {
// For IE browser
window.navigator.msSaveOrOpenBlob(blob, filename);
} else {
// For other browsers
var link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
}

function showPopup() {
document.getElementById('popupContainer').style.display = 'flex';
}

function hidePopup() {
document.getElementById('popupContainer').style.display = 'none';
}

function resetData() {
document.getElementById('inputText').value = '';
document.getElementById('outputContainer').innerHTML = '';
hidePopup();
}
</script>
</body>
</html>
'D': 'Button AlphaApologies for the incomplete response. It seems that the code provided in your previous message is cut off. Could you please provide the complete code or let me know how I can assist you further?

0 comments on commit 817f91a

Please sign in to comment.