From fd1a4453a542a9857902dacc10f10d9cafe68207 Mon Sep 17 00:00:00 2001 From: rahulkg666 <101547946+rahulkg666@users.noreply.github.com> Date: Wed, 11 Oct 2023 12:37:52 +0530 Subject: [PATCH 01/15] Update index.html --- public/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/public/index.html b/public/index.html index ab09aacd2b..660fd6734a 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,7 @@ <% } %> + Test
From 244b0f7bd5bd483eb11054b6c887dd52bcf73d32 Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Thu, 12 Oct 2023 00:46:52 +0530 Subject: [PATCH 02/15] copyprotection --- public/index.html | 2 +- src/copyprotection/hooks.js | 23 +++++++++++++++++++++++ src/index.jsx | 4 +++- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/copyprotection/hooks.js diff --git a/public/index.html b/public/index.html index 660fd6734a..e62ac90153 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ <% } %> - Test +
diff --git a/src/copyprotection/hooks.js b/src/copyprotection/hooks.js new file mode 100644 index 0000000000..dc30aa59ad --- /dev/null +++ b/src/copyprotection/hooks.js @@ -0,0 +1,23 @@ +import { useEffect } from "react"; +type EventType = "paste" | "copy" | "cut" +interface RestrictCopyPasteProps { + window: Window + actions: [EventType?,EventType?,EventType?] +} +export const useRestrictCopyPaste = (props: RestrictCopyPasteProps) => { + useEffect(() => { + props.actions?.forEach((action) => { + action && window.addEventListener(action, preventPaste); + }) + return () => { + props.actions.forEach((action) => { + action && window.removeEventListener(action, preventPaste); + }) + }; + }, [props.window, props.actions]); + + const preventPaste = (e: Event) => { + alert("Copying and pasting is not allowed!") + e.preventDefault() + } +} \ No newline at end of file diff --git a/src/index.jsx b/src/index.jsx index d99be587a7..19cd001ae6 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -37,7 +37,9 @@ import LiveTab from './course-home/live-tab/LiveTab'; import CourseAccessErrorPage from './generic/CourseAccessErrorPage'; import DecodePageRoute from './decode-page-route'; import { DECODE_ROUTES, ROUTES } from './constants'; - +import { useRestrictCopyPaste } from "./useRestrictCopyPaste" +const SignupForm = () =>{ +useRestrictCopyPaste({window, actions:["copy","cut","paste"]}) subscribe(APP_READY, () => { ReactDOM.render( From e53247a7f1d849702f8325eb32cf0fa1f1762125 Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Thu, 12 Oct 2023 17:04:58 +0530 Subject: [PATCH 03/15] changes --- src/copyprotection/hooks.js | 4 ++-- src/index.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/copyprotection/hooks.js b/src/copyprotection/hooks.js index dc30aa59ad..521725e276 100644 --- a/src/copyprotection/hooks.js +++ b/src/copyprotection/hooks.js @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +/*import { useEffect } from "react"; type EventType = "paste" | "copy" | "cut" interface RestrictCopyPasteProps { window: Window @@ -20,4 +20,4 @@ export const useRestrictCopyPaste = (props: RestrictCopyPasteProps) => { alert("Copying and pasting is not allowed!") e.preventDefault() } -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/src/index.jsx b/src/index.jsx index 19cd001ae6..65a2c5a446 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -37,9 +37,9 @@ import LiveTab from './course-home/live-tab/LiveTab'; import CourseAccessErrorPage from './generic/CourseAccessErrorPage'; import DecodePageRoute from './decode-page-route'; import { DECODE_ROUTES, ROUTES } from './constants'; -import { useRestrictCopyPaste } from "./useRestrictCopyPaste" +/*import { useRestrictCopyPaste } from "./useRestrictCopyPaste" const SignupForm = () =>{ -useRestrictCopyPaste({window, actions:["copy","cut","paste"]}) +useRestrictCopyPaste({window, actions:["copy","cut","paste"]})*/ subscribe(APP_READY, () => { ReactDOM.render( From 8781bc48b8ff9c5a1850848924296ae97c3bdeac Mon Sep 17 00:00:00 2001 From: rahulkg666 <101547946+rahulkg666@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:07:26 +0530 Subject: [PATCH 04/15] Update index.html --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index e62ac90153..660fd6734a 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ <% } %> - + Test
From 0458fc84340180c16c077dea79b74cd7ea10ea60 Mon Sep 17 00:00:00 2001 From: rahulkg666 <101547946+rahulkg666@users.noreply.github.com> Date: Thu, 12 Oct 2023 19:14:15 +0530 Subject: [PATCH 05/15] Update index.html --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 660fd6734a..e62ac90153 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ <% } %> - Test +
From 768032047efc5d22774f184cd7c78b303484891f Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Thu, 12 Oct 2023 19:36:30 +0530 Subject: [PATCH 06/15] index file changes for copy protect --- public/index.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index e62ac90153..06bf296868 100644 --- a/public/index.html +++ b/public/index.html @@ -10,8 +10,17 @@ <% } %> - - +
+ From 488a4ffa8b32519aab2b9cc29c4b0863740887fc Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sat, 14 Oct 2023 21:08:22 +0530 Subject: [PATCH 07/15] latest --- public/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index 06bf296868..ea01d327dd 100644 --- a/public/index.html +++ b/public/index.html @@ -10,17 +10,17 @@ <% } %> - +
- From 58c27a3c6ca32554be18f4a4e08ffb301bb2bb29 Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sat, 14 Oct 2023 21:29:18 +0530 Subject: [PATCH 08/15] latest --- public/index.html | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/public/index.html b/public/index.html index ea01d327dd..9353812203 100644 --- a/public/index.html +++ b/public/index.html @@ -8,19 +8,13 @@ <% if (htmlWebpackPlugin.options.OPTIMIZELY_PROJECT_ID) { %> + <% } %>
- + From 98d25072c4ff5d10c9e3aa57006df75e54345586 Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sat, 14 Oct 2023 21:31:49 +0530 Subject: [PATCH 09/15] latest --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 9353812203..2f01d2bbfd 100644 --- a/public/index.html +++ b/public/index.html @@ -9,7 +9,7 @@ <% if (htmlWebpackPlugin.options.OPTIMIZELY_PROJECT_ID) { %> <% } %> From 39d06aa8d6ff2fd91a38664ffa8700607bd22860 Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sat, 14 Oct 2023 21:34:36 +0530 Subject: [PATCH 10/15] latests --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 2f01d2bbfd..4b1e54f0a4 100644 --- a/public/index.html +++ b/public/index.html @@ -9,7 +9,7 @@ <% if (htmlWebpackPlugin.options.OPTIMIZELY_PROJECT_ID) { %> <% } %> From 005da40e55fc8d07de598b7be88dc394af7343fd Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sat, 14 Oct 2023 23:58:56 +0530 Subject: [PATCH 11/15] latest changes in index.html --- public/index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 4b1e54f0a4..3f57503d32 100644 --- a/public/index.html +++ b/public/index.html @@ -8,12 +8,9 @@ <% if (htmlWebpackPlugin.options.OPTIMIZELY_PROJECT_ID) { %> - <% } %> - +
From 7c38a78cb926b498bae428a6651e65e71dd60c5c Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sun, 15 Oct 2023 13:59:29 +0530 Subject: [PATCH 12/15] latest changes in index.html --- src/copyprotection/hooks.js | 23 ----------------------- src/index.jsx | 3 --- 2 files changed, 26 deletions(-) delete mode 100644 src/copyprotection/hooks.js diff --git a/src/copyprotection/hooks.js b/src/copyprotection/hooks.js deleted file mode 100644 index 521725e276..0000000000 --- a/src/copyprotection/hooks.js +++ /dev/null @@ -1,23 +0,0 @@ -/*import { useEffect } from "react"; -type EventType = "paste" | "copy" | "cut" -interface RestrictCopyPasteProps { - window: Window - actions: [EventType?,EventType?,EventType?] -} -export const useRestrictCopyPaste = (props: RestrictCopyPasteProps) => { - useEffect(() => { - props.actions?.forEach((action) => { - action && window.addEventListener(action, preventPaste); - }) - return () => { - props.actions.forEach((action) => { - action && window.removeEventListener(action, preventPaste); - }) - }; - }, [props.window, props.actions]); - - const preventPaste = (e: Event) => { - alert("Copying and pasting is not allowed!") - e.preventDefault() - } -}*/ \ No newline at end of file diff --git a/src/index.jsx b/src/index.jsx index 65a2c5a446..9cbffcf56c 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -37,9 +37,6 @@ import LiveTab from './course-home/live-tab/LiveTab'; import CourseAccessErrorPage from './generic/CourseAccessErrorPage'; import DecodePageRoute from './decode-page-route'; import { DECODE_ROUTES, ROUTES } from './constants'; -/*import { useRestrictCopyPaste } from "./useRestrictCopyPaste" -const SignupForm = () =>{ -useRestrictCopyPaste({window, actions:["copy","cut","paste"]})*/ subscribe(APP_READY, () => { ReactDOM.render( From b28e0e43cb622ee51c9a76a99ca03923b95b5b8a Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sun, 15 Oct 2023 14:52:22 +0530 Subject: [PATCH 13/15] latest changes in index.html --- public/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/public/index.html b/public/index.html index 3f57503d32..8ad092b350 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,7 @@ <% } %> + Test
From 7b6cdba3000efe497b13dccc7f6b58f2cc89a3a2 Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Sun, 15 Oct 2023 15:34:59 +0530 Subject: [PATCH 14/15] latest changes in index.html --- public/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/public/index.html b/public/index.html index 8ad092b350..3f57503d32 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,6 @@ <% } %> - Test
From f36da9fc16a898eeaef20a622c837354a9cf957d Mon Sep 17 00:00:00 2001 From: rahulkg666 Date: Wed, 18 Oct 2023 19:21:48 +0530 Subject: [PATCH 15/15] changes --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6a969ff262..09c76eb43a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Frontend learning application.", "repository": { "type": "git", - "url": "git+https://github.com/openedx/frontend-app-learning.git" + "url": "git+https://github.com/rahulkg666/frontend-app-learning.git" }, "browserslist": [ "extends @edx/browserslist-config" @@ -21,12 +21,12 @@ }, "author": "edX", "license": "AGPL-3.0", - "homepage": "https://github.com/openedx/frontend-app-learning#readme", + "homepage": "https://github.com/rahulkg666/frontend-app-learning#readme", "publishConfig": { "access": "public" }, "bugs": { - "url": "https://github.com/openedx/frontend-app-learning/issues" + "url": "https://github.com/rahulkg666/frontend-app-learning/issues" }, "dependencies": { "@edx/brand": "npm:@edx/brand-openedx@1.2.0",