File tree Expand file tree Collapse file tree 3 files changed +615
-46
lines changed
Expand file tree Collapse file tree 3 files changed +615
-46
lines changed Original file line number Diff line number Diff line change 88 "url-polyfill" : " ^1.1.7"
99 },
1010 "devDependencies" : {
11+ "chai" : " ^4.2.0" ,
1112 "grunt" : " ^1.0.4" ,
12- "grunt-browserify" : " ^5.3.0"
13+ "grunt-browserify" : " ^5.3.0" ,
14+ "mocha" : " ^7.0.1" ,
15+ "sinon" : " ^8.1.1"
1316 },
1417 "scripts" : {
1518 "test" : " echo \" Error: no test specified\" && exit 1"
3740 "url" : " https://github.com/imagekit-developer/imagekit-javascript/issues"
3841 },
3942 "homepage" : " https://github.com/imagekit-developer/imagekit-javascript#readme"
40- }
43+ }
Original file line number Diff line number Diff line change 1313 h4 Original Image
1414 p
1515 img( src ="" )
16- div( id ='trans_image ' )
16+ div( id ='transgit_image ' )
1717 h4 Sample transformation with height: 300, width: 400:
1818 p
1919 img( src ="" )
5757
5858 var el = document .getElementById (' images' )
5959 el .setAttribute (" style" , " " );
60-
61- // - var el = getImageURLElement(imagekit.url({
62- // - src: srcUrl,
63- // - transformation : sampleTransformations
64- // - }));
65- // - statusEl.appendChild(el);
66- // - console.log(imagekit.url({
67- // - src: result.url,
68- // - transformation : [{ HEIGHT: 300, WIDTH: 400}]
69- // - }));
7060 }
7161
7262
7363 });
7464 }
75-
76- function getImageURLElement (url ) {
77- anchorElement = document .createElement (' a' );
78- anchorElement .innerHTML = url;
79- anchorElement .setAttribute (" target" , " _blank" )
80- anchorElement .setAttribute (" href" , url);
81- divElement = document .createElement (" div" );
82- divElement .innerHTML = " You can access the image with sample transformation at: "
83- divElement .appendChild (anchorElement);
84- return divElement;
85- }
8665 } catch (ex) {
8766 console .log (ex);
8867 }
You can’t perform that action at this time.
0 commit comments