From 955d737dfe2a04d09d5de49f5af0d0d8a661290e Mon Sep 17 00:00:00 2001 From: kushagrag Date: Mon, 25 Jul 2016 16:32:36 +0530 Subject: [PATCH 1/2] Create manifest_doc --- stackOverflow/manifest_doc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 stackOverflow/manifest_doc diff --git a/stackOverflow/manifest_doc b/stackOverflow/manifest_doc new file mode 100644 index 0000000..2aad722 --- /dev/null +++ b/stackOverflow/manifest_doc @@ -0,0 +1,11 @@ +This manifest is nothing more than a metadata file in JSON format that contains properties like your extension's name, +description, version number and so on. +At a high level, we will use it to declare to Chrome what the extension is going to do, +and what permissions it requires in order to do those things. +"content_scripts.js": + "js": tells about the js file to be executed. + "matches": here we have given regex to give urls for those content script to be executed. +"icons": This gives the icon to be displayed in browser window when this extension is activated. +"description": This gives description of extension. +"version": Version of extebnsion is 0.1. +"name": This gives name of extension. From 470e2649ed82c26887a32e2f565db5aed00b7b5e Mon Sep 17 00:00:00 2001 From: kushagrag Date: Mon, 25 Jul 2016 18:45:49 +0530 Subject: [PATCH 2/2] Create expand_doc --- stackOverflow/expand_doc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 stackOverflow/expand_doc diff --git a/stackOverflow/expand_doc b/stackOverflow/expand_doc new file mode 100644 index 0000000..943e857 --- /dev/null +++ b/stackOverflow/expand_doc @@ -0,0 +1,7 @@ +In first two lines we create mouse events and initiate mouse click events. +Then we declare a total variable which tells about total comments on page, +it is initialized to 0. +Then we create a function clickComment. +We then retrieve all elements that have class as "comment-click". +Then we loop all the comments and expand the the comments which have "expand" as the first string. +Then we call the function clickComment().