2024-10-16 11:19:00 +03:00
|
|
|
<template>
|
|
|
|
<div v-html="toolResult"></div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
toolResult: "",
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
2024-11-04 16:55:31 +02:00
|
|
|
axios.post(`/api/php/phpinfo.php`, {}).then((response) => {
|
2024-10-16 11:19:00 +03:00
|
|
|
const phpinfoHTML = response.data;
|
|
|
|
|
|
|
|
// Create a temporary DOM element
|
|
|
|
const tempDiv = document.createElement("div");
|
|
|
|
tempDiv.innerHTML = phpinfoHTML;
|
|
|
|
|
|
|
|
// Select all <style> tags
|
|
|
|
const styleTags = tempDiv.querySelectorAll("style");
|
|
|
|
|
|
|
|
styleTags.forEach((styleTag) => {
|
|
|
|
// Get the CSS content
|
|
|
|
let cssContent = styleTag.innerHTML;
|
|
|
|
|
|
|
|
// Prepend "main " to each selector
|
|
|
|
cssContent = cssContent.replace(/([^{}]+){/g, "main $1 {");
|
|
|
|
|
|
|
|
// Update the <style> tag's content
|
|
|
|
styleTag.innerHTML = cssContent;
|
|
|
|
});
|
|
|
|
|
|
|
|
// Make <hr> full width
|
|
|
|
tempDiv.innerHTML += `
|
|
|
|
<style>
|
|
|
|
main hr {
|
|
|
|
width: 100% !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
`;
|
|
|
|
|
|
|
|
// Extract the modified HTML content
|
|
|
|
this.toolResult = tempDiv.innerHTML;
|
|
|
|
|
|
|
|
Promise.resolve(response);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss"></style>
|