View Single Post
Old 05-30-2018, 06:03 AM   #1
brolny
Connoisseur
brolny began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
Question Warning before save

Is it possible to show a warning before saving epub,
if code in js-file has changed the text in the xhtml-file?

--------------------
I have a quiz after every chapter
and it is not very usable to have an additional program for such testing.
Sometimes I forget what I should not save file after calling this function in Sigil,
so I have to check userAgent and use an additional program for tests.

Code:
function z(a)
{
 if (navigator.userAgent.search('sigil') > 0) {
  // do nothing;
 } else { 
  // do quiz, something like this 
  // document.getElementById("a").innerHTML = u[a][1];
 }
};
brolny is offline   Reply With Quote