easyprintand 1.0.7 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +18 -8
- package/package.json +6 -4
package/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* Version 2.4.1 Copyright (C) 2013
|
|
6
3
|
* Tested in IE 11, FF 28.0 and Chrome 33.0.1750.154
|
|
@@ -71,6 +68,16 @@
|
|
|
71
68
|
{
|
|
72
69
|
|
|
73
70
|
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
var $printSource = document.querySelector("div#" + id_elemento );
|
|
74
|
+
|
|
75
|
+
if (!$printSource){
|
|
76
|
+
console.log("No prindiv no puede imprimir por que \"div#" + id_elemento + "\" No existe");
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
74
81
|
|
|
75
82
|
var modos = modo;
|
|
76
83
|
var counter = 0;
|
|
@@ -113,9 +120,7 @@
|
|
|
113
120
|
|
|
114
121
|
|
|
115
122
|
|
|
116
|
-
|
|
117
|
-
var $printSource = document.querySelector("div#" + id_elemento );
|
|
118
|
-
|
|
123
|
+
|
|
119
124
|
|
|
120
125
|
var PrintAreaWindow = getPrintWindow();
|
|
121
126
|
|
|
@@ -334,7 +339,13 @@
|
|
|
334
339
|
|
|
335
340
|
|
|
336
341
|
|
|
337
|
-
|
|
342
|
+
export default prindiv;
|
|
343
|
+
export { prindiv };
|
|
344
|
+
|
|
345
|
+
// Para CommonJS (compatibilidad)
|
|
346
|
+
if (typeof module !== 'undefined') {
|
|
347
|
+
module.exports = prindiv;
|
|
348
|
+
}
|
|
338
349
|
|
|
339
350
|
|
|
340
351
|
|
|
@@ -343,4 +354,3 @@
|
|
|
343
354
|
|
|
344
355
|
|
|
345
356
|
|
|
346
|
-
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easyprintand",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Easily print the content of a DIV",
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
"import": "./index.js",
|
|
8
|
+
"require": "./index.js"
|
|
8
9
|
},
|
|
10
|
+
"type": "module",
|
|
9
11
|
"author": "AndresLopez",
|
|
10
12
|
"license": "ISC"
|
|
11
13
|
}
|