appscms-tools-theme 4.8.2 → 4.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/_data/.DS_Store +0 -0
  3. data/_data/about/en/about.json +16 -16
  4. data/_data/blog/nav.json +14 -14
  5. data/_data/blog/relatedblogs.json +2816 -2816
  6. data/_data/feature/en/batch-conversion.json +192 -192
  7. data/_data/feature/en/compress-pdf.json +223 -223
  8. data/_data/feature/en/devtools.json +321 -321
  9. data/_data/feature/en/face-detection.json +156 -156
  10. data/_data/feature/en/split-pdf.json +221 -221
  11. data/_data/feature/en/theframe.json +160 -160
  12. data/_data/footer/en/data.json +264 -264
  13. data/_data/header/en/data.json +672 -672
  14. data/_data/home/en/en.json +250 -250
  15. data/_data/home/en/posters.json +322 -322
  16. data/_data/home-1/en/en.json +236 -236
  17. data/_data/noindexURLs.json +23 -0
  18. data/_includes/.DS_Store +0 -0
  19. data/_includes/alternates/alternates.html +64 -89
  20. data/_includes/appscms/customblog/contenttool-recent-posts.html +94 -94
  21. data/_includes/appscms/customblog/pageRelatedPosts.html +68 -68
  22. data/_includes/appscms/customblog/recentposts.html +67 -67
  23. data/_includes/appscms/customblog/relatedBlogs.html +82 -82
  24. data/_includes/appscms/customblog/relatedposts.html +193 -193
  25. data/_includes/appscms/extras/appscms-postbox.html +57 -57
  26. data/_includes/appscms/featurePageAuthors/featurePageAuthors.html +85 -85
  27. data/_includes/appscms/head/bloghead.html +128 -128
  28. data/_includes/appscms/headings/contenttool-headings.html +33 -33
  29. data/_includes/appscms/headings/devtool-headings.html +38 -38
  30. data/_includes/appscms/home/contenttool-feature-boxes.html +19 -19
  31. data/_includes/appscms/home/devtool-feature-boxes.html +70 -70
  32. data/_includes/appscms/infographics/infographics.html +241 -32
  33. data/_includes/appscms/loaders/loader.html +4 -4
  34. data/_includes/appscms/navbars/devtool-navbar.html +50 -50
  35. data/_includes/appscms/navbars/devtool-toolbar.html +100 -100
  36. data/_includes/appscms/navbars/navbar.html +129 -75
  37. data/_includes/appscms/navbars/toolbar.html +326 -139
  38. data/_includes/appscms/recent-posts/recent_posts.html +90 -90
  39. data/_includes/appscms/recent-posts/related_categories_post.html +194 -194
  40. data/_includes/appscms/searchbar/devtool-searchbar.html +63 -63
  41. data/_includes/appscms/usp/usp.html +90 -90
  42. data/_includes/author_bio.html +41 -41
  43. data/_includes/authorpagehead/index.html +47 -47
  44. data/_includes/authors/authors.html +39 -39
  45. data/_includes/batch-conversion.html +141 -141
  46. data/_includes/bookmark.html +6 -6
  47. data/_includes/cssfile/links.html +54 -54
  48. data/_includes/custom-head.html +138 -138
  49. data/_includes/customCode.html +1 -1
  50. data/_includes/customScripts.html +1 -1
  51. data/_includes/customblog/pageRelatedPosts.html +87 -87
  52. data/_includes/customblog/recentposts.html +67 -67
  53. data/_includes/customblog/relatedBlogs.html +86 -86
  54. data/_includes/customblog/relatedposts.html +201 -201
  55. data/_includes/dropdown/langdropdown.html +32 -32
  56. data/_includes/feature.html +39 -39
  57. data/_includes/featurePageAuthors/featurePageAuthors.html +101 -101
  58. data/_includes/footer/index.html +537 -537
  59. data/_includes/google-analytics.html +32 -32
  60. data/_includes/head/index.html +627 -627
  61. data/_includes/header/blogHeader.html +34 -34
  62. data/_includes/header/index.html +152 -152
  63. data/_includes/infographics/infographics.html +244 -244
  64. data/_includes/internationalization-section.html +64 -47
  65. data/_includes/paginationBlogPage.html +70 -70
  66. data/_includes/postbox.html +65 -65
  67. data/_includes/script.html +493 -493
  68. data/_includes/section/count.html +32 -32
  69. data/_includes/section/recent_posts.html +94 -94
  70. data/_includes/section/related_categories_post.html +196 -196
  71. data/_includes/share/socialshare.html +21 -21
  72. data/_includes/userTracking.html +14 -14
  73. data/_layouts/aboutUs.html +175 -175
  74. data/_layouts/allAuthors.html +131 -131
  75. data/_layouts/appscms-about.html +163 -163
  76. data/_layouts/appscms-audio.html +33 -33
  77. data/_layouts/appscms-author.html +436 -436
  78. data/_layouts/appscms-authors.html +145 -145
  79. data/_layouts/appscms-batch.html +141 -141
  80. data/_layouts/appscms-calculator.html +93 -93
  81. data/_layouts/appscms-categories.html +26 -26
  82. data/_layouts/appscms-contact.html +132 -132
  83. data/_layouts/appscms-disclaimer.html +124 -124
  84. data/_layouts/appscms-download.html +289 -289
  85. data/_layouts/appscms-feature-result.html +96 -96
  86. data/_layouts/appscms-help.html +25 -25
  87. data/_layouts/appscms-imagekit.html +96 -96
  88. data/_layouts/appscms-post.html +243 -243
  89. data/_layouts/appscms-privacy-policy.html +781 -781
  90. data/_layouts/appscms-terms-and-conditions.html +646 -646
  91. data/_layouts/appscms-video.html +33 -33
  92. data/_layouts/audio.html +33 -33
  93. data/_layouts/author.html +409 -409
  94. data/_layouts/batch.html +177 -177
  95. data/_layouts/blog-1.html +116 -116
  96. data/_layouts/blog.html +131 -131
  97. data/_layouts/calculator.html +99 -99
  98. data/_layouts/contenttool-feature.html +42 -42
  99. data/_layouts/contenttool-home.html +53 -53
  100. data/_layouts/devtool-blog.html +132 -132
  101. data/_layouts/devtool-feature.html +54 -54
  102. data/_layouts/devtool-home.html +53 -53
  103. data/_layouts/devtools.html +57 -57
  104. data/_layouts/feature-1.html +285 -285
  105. data/_layouts/feature.html +351 -351
  106. data/_layouts/featureResultPage.html +82 -82
  107. data/_layouts/frame.html +222 -222
  108. data/_layouts/home-1.html +186 -186
  109. data/_layouts/home.html +375 -375
  110. data/_layouts/homeResultPage.html +32 -32
  111. data/_layouts/imagekit.html +308 -308
  112. data/_layouts/photo-effects-home.html +190 -190
  113. data/_layouts/post.html +233 -233
  114. data/assets/.DS_Store +0 -0
  115. data/assets/app.js +75 -75
  116. data/assets/css/appscms-blog.css +505 -505
  117. data/assets/css/appscms-contenttool.css +1384 -1384
  118. data/assets/css/appscms-home.css +5 -5
  119. data/assets/css/appscms-imagekit.css +855 -855
  120. data/assets/css/appscms-theme.css +11 -251
  121. data/assets/css/appscms-variables.css +24 -20
  122. data/assets/css/blog.css +510 -510
  123. data/assets/css/calculators.css +46 -46
  124. data/assets/css/common.css +944 -944
  125. data/assets/css/devtool-main.css +1350 -1350
  126. data/assets/css/devtools.css +105 -105
  127. data/assets/css/feature-1.css +293 -293
  128. data/assets/css/home-1.css +188 -188
  129. data/assets/css/imagekit copy.css +848 -848
  130. data/assets/css/imagekit.css +848 -848
  131. data/assets/css/tools.css +1846 -1846
  132. data/assets/images/close-button.svg +31 -31
  133. data/assets/images/digipaint.svg +6 -6
  134. data/assets/images/iconn.svg +12 -12
  135. data/assets/images/logo.svg +2 -2
  136. data/assets/images/manthink.svg +3552 -3552
  137. data/assets/images/search-icon.svg +2 -2
  138. data/assets/js/appscms-infographics.js +49 -49
  139. data/assets/js/batch.js +219 -219
  140. data/assets/js/devtools.js +81 -81
  141. data/assets/js/sharePage.js +65 -65
  142. data/assets/js/usageTracking.js +143 -143
  143. data/assets/js/usageTrackingEvents.js +6 -6
  144. data/assets/js/webvitals.js +4 -4
  145. metadata +5 -3
@@ -1,82 +1,82 @@
1
- let input_editor, output_editor, data;
2
- output_editor = ace.edit("output_editor");
3
- output_editor.setReadOnly(true)
4
- output_editor.session.setMode("ace/mode/json");
5
- input_editor = ace.edit("input_editor");
6
- input_editor.session.setMode("ace/mode/json");
7
- let upload_div_inner = document.getElementById("upload_div_inner")
8
- let file_upload = document.getElementById("file_upload")
9
- let format_btn = document.getElementById("format_btn")
10
- let inputcopyButton = document.querySelector("#inputcopy");
11
- let outputcopyButton = document.querySelector("#outputcopy");
12
- let deleteEditorInputTxt = document.querySelector(".input_editor_bar .cross_icon");
13
- let deleteEditorOuputTxt = document.querySelector(".output_editor_bar .cross_icon");
14
- const siteName = file_upload.dataset.sitename
15
- let selectedFile
16
-
17
- upload_div_inner.onclick = function () {
18
- document.querySelector("#file_upload").click();
19
- };
20
- file_upload.onchange = function (e) {
21
- var input = e.target.files[0];
22
- selectedFile = input
23
- input_editor = ace.edit("input_editor");
24
- input_editor.session.setMode("ace/mode/json");
25
- var reader = new FileReader();
26
- reader.onload = function () {
27
- input_editor.setValue(reader.result);
28
- }
29
- reader.readAsText(input);
30
- };
31
- document.querySelector("#input_editor_bar .save_icon").onclick = function () {
32
- file_saving_decision(1);
33
- };
34
- editorActions();
35
- function editorActions() {
36
- deleteEditorInputTxt.onclick = function () {
37
- input_editor.setValue("");
38
- }
39
- deleteEditorOuputTxt.onclick = function () {
40
- output_editor.setValue("");
41
- }
42
- inputcopyButton.addEventListener("click", (e) => {
43
- const el = document.createElement("textarea");
44
- el.value = input_editor.getValue();
45
- document.body.appendChild(el);
46
- el.select();
47
- document.execCommand("copy");
48
- e.target.setAttribute('data-original-title', 'Copied !')
49
- })
50
- outputcopyButton.addEventListener("click", (e) => {
51
- const el = document.createElement("textarea");
52
- el.value = output_editor.getValue();
53
- document.body.appendChild(el);
54
- el.select();
55
- document.execCommand("copy");
56
- e.target.setAttribute('data-original-title', 'Copied !')
57
- })
58
- }
59
- function file_saving_decision(flag) {
60
- if (flag == 1) {
61
- if (input_editor.getValue == "" || input_editor.getValue == undefined) {
62
- return false;
63
- } else {
64
- file_download(input_editor.getValue(), "application/json", "json");
65
- }
66
- } else if (flag == 0) {
67
- if (output_editor.getValue == "" || output_editor.getValue == undefined) {
68
- return false;
69
- } else {
70
- file_download(output_editor.getValue(), "text/plain", "txt");
71
- }
72
- }
73
- }
74
- function file_download(code, mimetype, extension) {
75
- var a = document.createElement("a");
76
- var data = new Blob([code], {
77
- type: mimetype,
78
- });
79
- a.href = window.URL.createObjectURL(data);
80
- a.download = `${siteName}.` + extension;
81
- a.click();
1
+ let input_editor, output_editor, data;
2
+ output_editor = ace.edit("output_editor");
3
+ output_editor.setReadOnly(true)
4
+ output_editor.session.setMode("ace/mode/json");
5
+ input_editor = ace.edit("input_editor");
6
+ input_editor.session.setMode("ace/mode/json");
7
+ let upload_div_inner = document.getElementById("upload_div_inner")
8
+ let file_upload = document.getElementById("file_upload")
9
+ let format_btn = document.getElementById("format_btn")
10
+ let inputcopyButton = document.querySelector("#inputcopy");
11
+ let outputcopyButton = document.querySelector("#outputcopy");
12
+ let deleteEditorInputTxt = document.querySelector(".input_editor_bar .cross_icon");
13
+ let deleteEditorOuputTxt = document.querySelector(".output_editor_bar .cross_icon");
14
+ const siteName = file_upload.dataset.sitename
15
+ let selectedFile
16
+
17
+ upload_div_inner.onclick = function () {
18
+ document.querySelector("#file_upload").click();
19
+ };
20
+ file_upload.onchange = function (e) {
21
+ var input = e.target.files[0];
22
+ selectedFile = input
23
+ input_editor = ace.edit("input_editor");
24
+ input_editor.session.setMode("ace/mode/json");
25
+ var reader = new FileReader();
26
+ reader.onload = function () {
27
+ input_editor.setValue(reader.result);
28
+ }
29
+ reader.readAsText(input);
30
+ };
31
+ document.querySelector("#input_editor_bar .save_icon").onclick = function () {
32
+ file_saving_decision(1);
33
+ };
34
+ editorActions();
35
+ function editorActions() {
36
+ deleteEditorInputTxt.onclick = function () {
37
+ input_editor.setValue("");
38
+ }
39
+ deleteEditorOuputTxt.onclick = function () {
40
+ output_editor.setValue("");
41
+ }
42
+ inputcopyButton.addEventListener("click", (e) => {
43
+ const el = document.createElement("textarea");
44
+ el.value = input_editor.getValue();
45
+ document.body.appendChild(el);
46
+ el.select();
47
+ document.execCommand("copy");
48
+ e.target.setAttribute('data-original-title', 'Copied !')
49
+ })
50
+ outputcopyButton.addEventListener("click", (e) => {
51
+ const el = document.createElement("textarea");
52
+ el.value = output_editor.getValue();
53
+ document.body.appendChild(el);
54
+ el.select();
55
+ document.execCommand("copy");
56
+ e.target.setAttribute('data-original-title', 'Copied !')
57
+ })
58
+ }
59
+ function file_saving_decision(flag) {
60
+ if (flag == 1) {
61
+ if (input_editor.getValue == "" || input_editor.getValue == undefined) {
62
+ return false;
63
+ } else {
64
+ file_download(input_editor.getValue(), "application/json", "json");
65
+ }
66
+ } else if (flag == 0) {
67
+ if (output_editor.getValue == "" || output_editor.getValue == undefined) {
68
+ return false;
69
+ } else {
70
+ file_download(output_editor.getValue(), "text/plain", "txt");
71
+ }
72
+ }
73
+ }
74
+ function file_download(code, mimetype, extension) {
75
+ var a = document.createElement("a");
76
+ var data = new Blob([code], {
77
+ type: mimetype,
78
+ });
79
+ a.href = window.URL.createObjectURL(data);
80
+ a.download = `${siteName}.` + extension;
81
+ a.click();
82
82
  }
@@ -1,65 +1,65 @@
1
- document
2
- .getElementsByClassName("close-share-modal")[0]
3
- .addEventListener("click", function () {
4
- document.getElementsByClassName("shareModal")[0].style.display = "none";
5
- });
6
-
7
- document
8
- .getElementsByClassName("facebook")[0]
9
- .addEventListener("click", function () {
10
- window.open(
11
- "https://www.facebook.com/sharer/sharer.php?u=" +
12
- encodeURIComponent(window.location.href)
13
- );
14
- });
15
-
16
- document
17
- .getElementsByClassName("instagram")[0]
18
- .addEventListener("click", function () {
19
- window.open("https://www.instagram.com/");
20
- });
21
-
22
- document
23
- .getElementsByClassName("twitter")[0]
24
- .addEventListener("click", function () {
25
- window.open(
26
- "https://twitter.com/share?url=" +
27
- encodeURIComponent(window.location.href)
28
- );
29
- });
30
-
31
- document
32
- .getElementsByClassName("whatsapp")[0]
33
- .addEventListener("click", function () {
34
- window.open(
35
- "https://api.whatsapp.com/send?text=" +
36
- encodeURIComponent(window.location.href)
37
- );
38
- });
39
-
40
- document
41
- .getElementsByClassName("telegram")[0]
42
- .addEventListener("click", function () {
43
- window.open(
44
- "https://telegram.me/share/url?url=" +
45
- encodeURIComponent(window.location.href)
46
- );
47
- });
48
-
49
- document
50
- .getElementsByClassName("pinterest")[0]
51
- .addEventListener("click", function () {
52
- window.open(
53
- "https://pinterest.com/pin/create/button/?url=" +
54
- encodeURIComponent(window.location.href)
55
- );
56
- });
57
-
58
- document
59
- .getElementsByClassName("linkedin")[0]
60
- .addEventListener("click", function () {
61
- window.open(
62
- "https://www.linkedin.com/shareArticle?mini=true&url=" +
63
- encodeURIComponent(window.location.href)
64
- );
65
- });
1
+ document
2
+ .getElementsByClassName("close-share-modal")[0]
3
+ .addEventListener("click", function () {
4
+ document.getElementsByClassName("shareModal")[0].style.display = "none";
5
+ });
6
+
7
+ document
8
+ .getElementsByClassName("facebook")[0]
9
+ .addEventListener("click", function () {
10
+ window.open(
11
+ "https://www.facebook.com/sharer/sharer.php?u=" +
12
+ encodeURIComponent(window.location.href)
13
+ );
14
+ });
15
+
16
+ document
17
+ .getElementsByClassName("instagram")[0]
18
+ .addEventListener("click", function () {
19
+ window.open("https://www.instagram.com/");
20
+ });
21
+
22
+ document
23
+ .getElementsByClassName("twitter")[0]
24
+ .addEventListener("click", function () {
25
+ window.open(
26
+ "https://twitter.com/share?url=" +
27
+ encodeURIComponent(window.location.href)
28
+ );
29
+ });
30
+
31
+ document
32
+ .getElementsByClassName("whatsapp")[0]
33
+ .addEventListener("click", function () {
34
+ window.open(
35
+ "https://api.whatsapp.com/send?text=" +
36
+ encodeURIComponent(window.location.href)
37
+ );
38
+ });
39
+
40
+ document
41
+ .getElementsByClassName("telegram")[0]
42
+ .addEventListener("click", function () {
43
+ window.open(
44
+ "https://telegram.me/share/url?url=" +
45
+ encodeURIComponent(window.location.href)
46
+ );
47
+ });
48
+
49
+ document
50
+ .getElementsByClassName("pinterest")[0]
51
+ .addEventListener("click", function () {
52
+ window.open(
53
+ "https://pinterest.com/pin/create/button/?url=" +
54
+ encodeURIComponent(window.location.href)
55
+ );
56
+ });
57
+
58
+ document
59
+ .getElementsByClassName("linkedin")[0]
60
+ .addEventListener("click", function () {
61
+ window.open(
62
+ "https://www.linkedin.com/shareArticle?mini=true&url=" +
63
+ encodeURIComponent(window.location.href)
64
+ );
65
+ });
@@ -1,143 +1,143 @@
1
- // Generate a unique ID for the user (if not already generated)
2
- const generateUserID = () => {
3
- // Check if the user ID is already stored in cookies or local storage
4
- const storedUserID = getStoredUserID();
5
-
6
- if (storedUserID) {
7
- return storedUserID;
8
- }
9
-
10
- // Example: Generating a random string
11
- const characters =
12
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
13
- let id = "";
14
- for (let i = 0; i < 10; i++) {
15
- id += characters.charAt(Math.floor(Math.random() * characters.length));
16
- }
17
-
18
- // Store the generated user ID in cookies or local storage
19
- storeUserID(id);
20
-
21
- return id;
22
- };
23
-
24
- // Get the stored user ID from cookies or local storage
25
- const getStoredUserID = () => {
26
- return localStorage.getItem("userID");
27
- };
28
-
29
- // Store the user ID in cookies or local storage
30
- const storeUserID = (userID) => {
31
- localStorage.setItem("userID", userID);
32
- };
33
-
34
- // Get the current date in YYYY-MM-DD format
35
- const getCurrentDate = () => {
36
- const today = new Date();
37
- const year = today.getFullYear();
38
- const month = String(today.getMonth() + 1).padStart(2, "0");
39
- const day = String(today.getDate()).padStart(2, "0");
40
- return `${year}-${month}-${day}`;
41
- };
42
-
43
- let userTrackingCountLimit = "20";
44
- const checkUsage = () => {
45
- const today = new Date().toDateString();
46
- const usageCount = getCookie("featureUsageCount");
47
-
48
- if (usageCount) {
49
- // User has already used the feature today
50
- if (usageCount >= Number(userTrackingCountLimit)) {
51
- showShareModal();
52
- } else {
53
- incrementUsageCount(usageCount);
54
- }
55
- } else {
56
- // First usage of the day
57
- setCookie("featureUsageCount", 1, getExpirationDate());
58
- }
59
- const userID = generateUserID();
60
- try {
61
- if ((usageCount + 1) % 5 === 0) {
62
- gtag("event", `feature_used_${usageCount + 1}_times`, {
63
- user_id: userID,
64
- userID: userID,
65
- feature: window.location.pathname + location.search,
66
- });
67
- }
68
- } catch (error) {
69
- console.log(error);
70
- }
71
-
72
- try {
73
- gtag("event", "feature_used", {
74
- user_id: userID,
75
- userID: userID,
76
- feature: window.location.pathname + location.search,
77
- });
78
- } catch (error) {
79
- console.log(error);
80
- }
81
- };
82
- const incrementUsageCount = (count) => {
83
- const today = new Date().toDateString();
84
-
85
- if (count >= Number(userTrackingCountLimit)) {
86
- showShareModal();
87
- } else {
88
- count++;
89
- setCookie("featureUsageCount", count, getExpirationDate());
90
- }
91
- };
92
-
93
- const showShareModal = () => {
94
- document.getElementById("shareModal").style.display = "block";
95
- };
96
-
97
- const handleShare = () => {
98
- const usageCount = getCookie("featureUsageCount");
99
- if (usageCount) {
100
- setCookie("featureUsageCount", 0, getExpirationDate());
101
- }
102
- document.getElementById("shareModal").style.display = "none";
103
- try {
104
- const userID = generateUserID();
105
- gtag("event", "feature_shared", {
106
- user_id: userID,
107
- userID: userID,
108
- feature: window.location.pathname + location.search,
109
- });
110
- } catch (error) {
111
- console.log(error);
112
- }
113
- };
114
-
115
- const getCookie = (name) => {
116
- const cookies = document.cookie.split(";");
117
- for (let i = 0; i < cookies.length; i++) {
118
- const cookie = cookies[i].trim();
119
- if (cookie.indexOf(name + "=") === 0) {
120
- return parseInt(cookie.substring((name + "=").length, cookie.length));
121
- }
122
- }
123
- return null;
124
- };
125
-
126
- const setCookie = (name, value, expires) => {
127
- document.cookie = `${name}=${value};expires=${expires};path=/`;
128
- };
129
-
130
- const getExpirationDate = () => {
131
- const date = new Date();
132
- date.setTime(date.getTime() + 24 * 60 * 60 * 1000); // 24 hours in milliseconds
133
- return date.toUTCString();
134
- };
135
- const socialShare = document.querySelectorAll(".social-share");
136
-
137
- if (socialShare) {
138
- Array.from(socialShare).map((item) => {
139
- item.addEventListener("click", () => {
140
- handleShare();
141
- });
142
- });
143
- }
1
+ // Generate a unique ID for the user (if not already generated)
2
+ const generateUserID = () => {
3
+ // Check if the user ID is already stored in cookies or local storage
4
+ const storedUserID = getStoredUserID();
5
+
6
+ if (storedUserID) {
7
+ return storedUserID;
8
+ }
9
+
10
+ // Example: Generating a random string
11
+ const characters =
12
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
13
+ let id = "";
14
+ for (let i = 0; i < 10; i++) {
15
+ id += characters.charAt(Math.floor(Math.random() * characters.length));
16
+ }
17
+
18
+ // Store the generated user ID in cookies or local storage
19
+ storeUserID(id);
20
+
21
+ return id;
22
+ };
23
+
24
+ // Get the stored user ID from cookies or local storage
25
+ const getStoredUserID = () => {
26
+ return localStorage.getItem("userID");
27
+ };
28
+
29
+ // Store the user ID in cookies or local storage
30
+ const storeUserID = (userID) => {
31
+ localStorage.setItem("userID", userID);
32
+ };
33
+
34
+ // Get the current date in YYYY-MM-DD format
35
+ const getCurrentDate = () => {
36
+ const today = new Date();
37
+ const year = today.getFullYear();
38
+ const month = String(today.getMonth() + 1).padStart(2, "0");
39
+ const day = String(today.getDate()).padStart(2, "0");
40
+ return `${year}-${month}-${day}`;
41
+ };
42
+
43
+ let userTrackingCountLimit = "20";
44
+ const checkUsage = () => {
45
+ const today = new Date().toDateString();
46
+ const usageCount = getCookie("featureUsageCount");
47
+
48
+ if (usageCount) {
49
+ // User has already used the feature today
50
+ if (usageCount >= Number(userTrackingCountLimit)) {
51
+ showShareModal();
52
+ } else {
53
+ incrementUsageCount(usageCount);
54
+ }
55
+ } else {
56
+ // First usage of the day
57
+ setCookie("featureUsageCount", 1, getExpirationDate());
58
+ }
59
+ const userID = generateUserID();
60
+ try {
61
+ if ((usageCount + 1) % 5 === 0) {
62
+ gtag("event", `feature_used_${usageCount + 1}_times`, {
63
+ user_id: userID,
64
+ userID: userID,
65
+ feature: window.location.pathname + location.search,
66
+ });
67
+ }
68
+ } catch (error) {
69
+ console.log(error);
70
+ }
71
+
72
+ try {
73
+ gtag("event", "feature_used", {
74
+ user_id: userID,
75
+ userID: userID,
76
+ feature: window.location.pathname + location.search,
77
+ });
78
+ } catch (error) {
79
+ console.log(error);
80
+ }
81
+ };
82
+ const incrementUsageCount = (count) => {
83
+ const today = new Date().toDateString();
84
+
85
+ if (count >= Number(userTrackingCountLimit)) {
86
+ showShareModal();
87
+ } else {
88
+ count++;
89
+ setCookie("featureUsageCount", count, getExpirationDate());
90
+ }
91
+ };
92
+
93
+ const showShareModal = () => {
94
+ document.getElementById("shareModal").style.display = "block";
95
+ };
96
+
97
+ const handleShare = () => {
98
+ const usageCount = getCookie("featureUsageCount");
99
+ if (usageCount) {
100
+ setCookie("featureUsageCount", 0, getExpirationDate());
101
+ }
102
+ document.getElementById("shareModal").style.display = "none";
103
+ try {
104
+ const userID = generateUserID();
105
+ gtag("event", "feature_shared", {
106
+ user_id: userID,
107
+ userID: userID,
108
+ feature: window.location.pathname + location.search,
109
+ });
110
+ } catch (error) {
111
+ console.log(error);
112
+ }
113
+ };
114
+
115
+ const getCookie = (name) => {
116
+ const cookies = document.cookie.split(";");
117
+ for (let i = 0; i < cookies.length; i++) {
118
+ const cookie = cookies[i].trim();
119
+ if (cookie.indexOf(name + "=") === 0) {
120
+ return parseInt(cookie.substring((name + "=").length, cookie.length));
121
+ }
122
+ }
123
+ return null;
124
+ };
125
+
126
+ const setCookie = (name, value, expires) => {
127
+ document.cookie = `${name}=${value};expires=${expires};path=/`;
128
+ };
129
+
130
+ const getExpirationDate = () => {
131
+ const date = new Date();
132
+ date.setTime(date.getTime() + 24 * 60 * 60 * 1000); // 24 hours in milliseconds
133
+ return date.toUTCString();
134
+ };
135
+ const socialShare = document.querySelectorAll(".social-share");
136
+
137
+ if (socialShare) {
138
+ Array.from(socialShare).map((item) => {
139
+ item.addEventListener("click", () => {
140
+ handleShare();
141
+ });
142
+ });
143
+ }
@@ -1,6 +1,6 @@
1
- const inputBoxOfFeatureFile = document.querySelector("#inputbox");
2
- if (inputBoxOfFeatureFile) {
3
- inputBoxOfFeatureFile.addEventListener("click", () => {
4
- checkUsage();
5
- });
6
- }
1
+ const inputBoxOfFeatureFile = document.querySelector("#inputbox");
2
+ if (inputBoxOfFeatureFile) {
3
+ inputBoxOfFeatureFile.addEventListener("click", () => {
4
+ checkUsage();
5
+ });
6
+ }
@@ -1,5 +1,5 @@
1
-
2
- webVitals.onCLS(console.log);
3
- webVitals.onFID(console.log);
4
- webVitals.onLCP(console.log);
1
+
2
+ webVitals.onCLS(console.log);
3
+ webVitals.onFID(console.log);
4
+ webVitals.onLCP(console.log);
5
5
  webVitals.onINP(console.log);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.2
4
+ version: 4.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-07 00:00:00.000000000 Z
11
+ date: 2024-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - LICENSE.txt
63
63
  - README.md
64
+ - _data/.DS_Store
64
65
  - _data/about/en/about.json
65
66
  - _data/blog/alertbar.yml
66
67
  - _data/blog/authors.yml
@@ -97,6 +98,7 @@ files:
97
98
  - _data/home/hi/hi.json
98
99
  - _data/languagesupport/compress-pdf-langs.json
99
100
  - _data/languagesupport/index-langs.json
101
+ - _data/noindexURLs.json
100
102
  - _data/photo-categories.json
101
103
  - _data/photoeffects.json
102
104
  - _data/privacy/en/privacyPolicy.json
@@ -615,7 +617,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
615
617
  - !ruby/object:Gem::Version
616
618
  version: '0'
617
619
  requirements: []
618
- rubygems_version: 3.4.10
620
+ rubygems_version: 3.3.26
619
621
  signing_key:
620
622
  specification_version: 4
621
623
  summary: Appscms theme for all tools