Advertisement
nsaunders

Untitled

Oct 10th, 2022
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1.  
  2. var clicks = 0;
  3.  
  4.  
  5. function doGet(e) {
  6. Logger.log(JSON.stringify(e));
  7. var htmlOutput = HtmlService.createTemplateFromFile('ExampleFile3');
  8. if (!e.parameter['update']) {
  9. htmlOutput.update = '';
  10. clicks = clicks + 99;
  11. }
  12. else {
  13. htmlOutput.update = 'updated value is: ' + e.parameter['update'];
  14. clicks = clicks + 7;
  15. }
  16. clicks = clicks + 3;
  17. htmlOutput.clicks = clicks;
  18. htmlOutput.count = clicks;
  19. htmlOutput.count = 'count is: ' + clicks;
  20. htmlOutput.url = getUrl();
  21. return htmlOutput.evaluate();
  22. }
  23.  
  24.  
  25.  
  26.  
  27.  
  28. function getUrl() {
  29. var url = ScriptApp.getService().getUrl();
  30. return url;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement