File tree Expand file tree Collapse file tree 7 files changed +112
-0
lines changed
Responsive Design Checker Expand file tree Collapse file tree 7 files changed +112
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Responsive Design Checker</ title >
7
+ < link rel ="stylesheet " href ="style.css ">
8
+ </ head >
9
+ < body >
10
+ < h1 > Responsive Design Checker</ h1 >
11
+ < div class ="controls ">
12
+ < label for ="url "> URL: </ label >
13
+ < input type ="text " id ="url " placeholder ="Enter website URL ">
14
+ < button id ="loadButton "> Load URL</ button >
15
+ </ div >
16
+ < div class ="iframe-container ">
17
+ < div class ="iframe-wrapper ">
18
+ < label for ="desktop "> Desktop (1024x768)</ label >
19
+ < iframe id ="desktop " width ="1024 " height ="768 "> </ iframe >
20
+ </ div >
21
+ < div class ="iframe-wrapper ">
22
+ < label for ="tablet "> Tablet (768x1024)</ label >
23
+ < iframe id ="tablet " width ="768 " height ="1024 "> </ iframe >
24
+ </ div >
25
+ < div class ="iframe-wrapper ">
26
+ < label for ="mobile "> Mobile (375x667)</ label >
27
+ < iframe id ="mobile " width ="375 " height ="667 "> </ iframe >
28
+ </ div >
29
+ </ div >
30
+ < script src ="script.js "> </ script >
31
+ </ body >
32
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "manifest_version" : 3 ,
3
+ "name" : " Responsive Design Checker" ,
4
+ "version" : " 1.0" ,
5
+ "description" : " A tool to check responsive design of websites" ,
6
+ "action" : {
7
+ "default_popup" : " index.html" ,
8
+ "default_icon" : {
9
+ "16" : " icon16.png" ,
10
+ "48" : " icon48.png" ,
11
+ "128" : " icon128.png"
12
+ }
13
+ },
14
+ "permissions" : [" activeTab" ],
15
+ "icons" : {
16
+ "16" : " icon16.png" ,
17
+ "48" : " icon48.png" ,
18
+ "128" : " icon128.png"
19
+ }
20
+ }
21
+
Original file line number Diff line number Diff line change
1
+ document . getElementById ( 'loadButton' ) . addEventListener ( 'click' , function ( ) {
2
+ const url = document . getElementById ( 'url' ) . value ;
3
+ if ( url ) {
4
+ document . getElementById ( 'desktop' ) . src = url ;
5
+ document . getElementById ( 'tablet' ) . src = url ;
6
+ document . getElementById ( 'mobile' ) . src = url ;
7
+ } else {
8
+ alert ( 'Please enter a valid URL' ) ;
9
+ }
10
+ } ) ;
Original file line number Diff line number Diff line change
1
+ body {
2
+ display : flex;
3
+ flex-direction : column;
4
+ align-items : center;
5
+ font-family : Arial, sans-serif;
6
+ margin : 0 ;
7
+ padding : 20px ;
8
+ width : 100% ;
9
+ box-sizing : border-box;
10
+ overflow : auto;
11
+ min-width : 1100px ;
12
+ min-height : 1100px ;
13
+ }
14
+
15
+ h1 {
16
+ margin-top : 0 ;
17
+ }
18
+
19
+ .controls {
20
+ margin-bottom : 20px ;
21
+ }
22
+
23
+ .controls input {
24
+ margin : 0 5px ;
25
+ }
26
+
27
+ .iframe-container {
28
+ display : flex;
29
+ flex-direction : column;
30
+ align-items : center;
31
+ width : 100% ;
32
+ }
33
+
34
+ .iframe-wrapper {
35
+ display : flex;
36
+ flex-direction : column;
37
+ align-items : center;
38
+ margin : 10px 0 ;
39
+ width : 100% ;
40
+ }
41
+
42
+ iframe {
43
+ border : 1px solid # ccc ;
44
+ margin : 5px ;
45
+ }
46
+
47
+ label {
48
+ font-weight : bold;
49
+ }
You can’t perform that action at this time.
0 commit comments