1
0

head.txt 918 B

12345678910111213141516171819202122232425262728293031
  1. <meta name="rating" content="adult" />
  2. <script>
  3. window.SweetCube ??= {passageInitOverwrites:[], originalPassageContents:{}};
  4. function applyModifications(modifications={}){
  5. function applyModification(passage, modification){
  6. passage.element.innerHTML = modification;
  7. return passage;
  8. }
  9. window.SweetCube.passageInitOverwrites.push((pid,passage)=>{
  10. const passageName = passage?.element?.attributes?.name?.value;
  11. if(!passageName || !modifications[passageName])
  12. return passage;
  13. window.SweetCube.originalPassageContents[passageName] = passage.element.innerHTML;
  14. const modification = modifications[passageName];
  15. return applyModification(passage,modification);
  16. });
  17. }
  18. const modificationsString = localStorage.getItem("SweetCube.Modifications");
  19. if(modificationsString){
  20. const modifications = JSON.parse(modificationsString);
  21. applyModifications(modifications);
  22. }
  23. </script>