interface UserScript {
name: string;
url: string;
}
interface EamusementUserscriptModalProps {
isOpen: boolean;
onClose: () => void;
mainGameName: string;
userPage: string;
importPage: string;
scripts: UserScript[];
}
interface EamusementUserscriptCardProps {
mainGameName: string;
onClick: () => void;
}
export const EamusementUserscriptCard = ({ mainGameName, onClick }: EamusementUserscriptCardProps) => {
return (
{mainGameName} e-amusement Play History (Userscript)
Import via scraping your {mainGameName} playdata from KONAMI e-amusement
)
}
const EamusementUserscriptModal = ({
isOpen,
onClose,
mainGameName,
userPage,
importPage,
scripts,
}: EamusementUserscriptModalProps) => {
if (!isOpen) return null;
const handleClose = () => {
onClose();
};
if(mainGameName === undefined){
return "Sorry, due to some extreme error the game you're looking for doesn't seem to exist..."
}
return (
{/* Backdrop */}
{/* Modal */}
{/* Header */}
Import {mainGameName} e-amusement Data
Follow the instructions below to import your data
{/* Warning */}
{/* Instructions */}
Instructions:
-
Log into the{" "}
{mainGameName} e-amusement page
-
Navigate to the{" "}
{mainGameName} Play History Page
{" "}
-
Install the relevant userscript (use a browser extension such as{" "}
Tampermonkey)
{/* Additional Info */}
-
A button will appear on the page that you can click to start the scraping process.
-
Upload the resulting JSON file into Mirage using the
Batch-Manual Upload functionality
- Verify that all data has been imported correctly
{/* Actions */}
);
};
export default EamusementUserscriptModal;