Fixed export keywords button

This commit is contained in:
2016-04-11 11:07:20 +08:00
parent ad97240d37
commit 0bfa47fa63
3 changed files with 22 additions and 10 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "keywordshitter2",
"version": "0.0.5",
"description": "The second generation of keyword shitter. Bigger, better, and more pungent than other products.",
"main": "server.js",
"main": "public/js/main.js",
"repository": "https://github.com/wassname/keywordshitter2",
"scripts": {
"test": "public/test.html",
-4
View File
@@ -64,10 +64,6 @@ lying internet</textarea>
<div class="col-sm-5">
<form id="advanced" class="collapse">
<br>
<a class="btn btn-default" id="load-from-cache" title="Load cached data from previous sessions" type="button" >Load cache</a>
<a class="btn btn-default" id="export-from-cache" title="Export cached data from previous sessions as a json file" type="button">Export cache</a>
<a class="btn btn-default" id="clear-cache" title="Delete cached data" type="button">Delete cache</a>
<div class="form-group">
<label for="service">Service:</label>
+21 -5
View File
@@ -768,16 +768,32 @@ var KWS = function(){
extend: 'csvHtml5',
fieldBoundary: "",
text: 'Copy keywords',
// 'customize': function(data,options){return data.split('\n').join(',');},
// 'customize': function(data,options){
// console.log(data,options);return data.split('\n').join(',');
// },
header: false,
exportOptions: {
stripNewlines: true,
stripHtml: true,
decodeEntities: true,
columns: 'keyword',
// format:{
// body: function(html,i){console.log(html);return html}
// }
columns: 1,
// format:{
// body: function(html,i){
// console.log(html);return html
// }
// }
}
},
{
extend: 'csvHtml5',
fieldBoundary: "",
text: 'Copy visible columns',
header: false,
exportOptions: {
columns: ':visible',
stripNewlines: true,
stripHtml: true,
decodeEntities: true,
}
},
]