mirror of
https://github.com/wassname/keywordshitter2.git
synced 2026-06-27 16:10:23 +08:00
bugfixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Keywordshitter2 - The Bulk Keyword Tool
|
||||
|
||||
An update of the beloved keyword generation tool [keywordshitter](keywordshitter.com). [Demo here](http://wassname.github.io/keywordshitter2/).
|
||||
An update of the beloved keyword generation tool keywordshitter.com. [Try it here.](http://wassname.github.io/keywordshitter2/).
|
||||
|
||||
#New features:
|
||||
|
||||
@@ -13,14 +13,15 @@ An update of the beloved keyword generation tool [keywordshitter](keywordshitter
|
||||
|
||||
- Shit theme
|
||||
- Simple
|
||||
- Humor suitable for a todler
|
||||
- Humor suitable for a toddler
|
||||
- Cunningly lower user expectations to zero, then exceed them
|
||||
|
||||
## Coming soon (TM):
|
||||
|
||||
- Multiple services
|
||||
- Updated toilet logo
|
||||
- Less bugs
|
||||
- CPC and Volume integration from KeywordKeg
|
||||
- CPC and Volume integration possibly
|
||||
|
||||
|
||||
# License
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 59 KiB |
+12
-9
@@ -11,17 +11,15 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="http://wassname.github.io/keywordshitter2/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
|
||||
|
||||
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<img class="center-block responsive img img-responsive img-rounded" style="max-height: 8em" src="img/bl.png">
|
||||
<img class="center-block responsive img img-responsive img-rounded" style="max-height: 10em" src="img/bl.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +36,7 @@ on purpose
|
||||
dismantled my
|
||||
lying internet</textarea>
|
||||
</div>
|
||||
<a class="btn btn-primary" id="startjob" onclick="StartJob();" type="button" value="Shit Keywords!">Shit Keywords!</a>
|
||||
<a class="btn btn-primary btn-lg" id="startjob" onclick="StartJob();" type="button" value="Shit Keywords!">Shit Keywords!</a>
|
||||
|
||||
|
||||
<button class="btn btn-default" type="button" data-toggle="collapse" data-target="#advanced" aria-expanded="false" aria-controls="advanced">
|
||||
@@ -48,7 +46,8 @@ lying internet</textarea>
|
||||
<button class="btn btn-default" type="button" data-toggle="collapse" data-target="#about" aria-expanded="false" aria-controls="about">
|
||||
About
|
||||
</button>
|
||||
<a class="btn btn-default" id="reset" onclick="reset();" type="button" value="CleResetar">Reset</a>
|
||||
<a class="btn btn-default" id="reset" title="Load cached data from previous sessions" onclick="loadFromDB();" type="button" value="load">Load cache</a>
|
||||
<a class="btn btn-default" id="reset" title="Empty all input and results" onclick="reset();" type="button" value="Reset">Reset</a>
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="col-sm-2"> -->
|
||||
@@ -97,11 +96,14 @@ lying internet</textarea>
|
||||
</form>
|
||||
|
||||
<div id="about" class="collapse">
|
||||
<p>Keyword shitter 2 is inspired by the amazing Keyword shitter 1!</p>
|
||||
<p></p>
|
||||
<p>Keyword shitter 2 is a bulk keyword finder based of the beloved keyword shitter. The tool is great for finding long tail keywords and cunningly lowered your expectations to zero, then manager to exceed them.</p>
|
||||
|
||||
<p>New features include: multiple services, sorting results, configurable keywords stemming, IndexDB storage, and some options.</p>
|
||||
<p>New features include: results table, sorting results, configurable keywords permutations, IndexDB storage, and more options.</p>
|
||||
|
||||
<p>But you will be glad to know we kept the same old shit name.</p>
|
||||
<p>But you will be relieved to know we kept the same old shit theme and toddler humor.</p>
|
||||
|
||||
<a href="https://github.com/wassname/keywordshitter2">More information on github.</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -150,8 +152,9 @@ lying internet</textarea>
|
||||
<script type="text/javascript" src="js/main.js"></script>
|
||||
|
||||
|
||||
<a href="https://github.com/wassname/keywordshitter2"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
|
||||
<!-- Fork me on github... Do you get it? Do you! Oh um. Well they say the best jokes are the ones you have to explain. Or at least, I'm sure someone has said that, somewhere. I'll explain it for you, just for you. You know how in the matrix they say there is no spoon? Well there is no spooning is what I should out in the theature everytime! But don't worry you can fuck me on github, I mean fork. Think about it! I haven't. It makes sense now right? Erm. Well. Bye. -->
|
||||
|
||||
<a href="http://wassname.github.io/keywordshitter2/">Fork me on github</a>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
+110
-80
@@ -117,12 +117,11 @@ window.setInterval(DoJob, 750);
|
||||
|
||||
function StartJob() {
|
||||
if (doWork === false) {
|
||||
keywordsToDisplay = [];
|
||||
hashMapResults = {};
|
||||
keywordsToQuery = [];
|
||||
keywordsToQueryIndex = 0;
|
||||
|
||||
// hashMapResults[""] = 1;
|
||||
hashMapResults[""] = 1;
|
||||
// hashMapResults[" "] = 1;
|
||||
// hashMapResults[" "] = 1;
|
||||
|
||||
@@ -134,17 +133,7 @@ function StartJob() {
|
||||
var i = 0;
|
||||
for (i = 0; i < ks.length; i++) {
|
||||
keywordsToQuery[keywordsToQuery.length] = ks[i];
|
||||
// keywordsToDisplay[keywordsToDisplay.length] = {
|
||||
// Keyword: ks[i]
|
||||
// };
|
||||
|
||||
// var j = 0;
|
||||
// for (j = 0; j < 26; j++) {
|
||||
// var chr = String.fromCharCode(97 + j);
|
||||
// var currentx = ks[i] + ' ' + chr;
|
||||
// keywordsToQuery[keywordsToQuery.length] = currentx;
|
||||
// hashMapResults[currentx] = 1;
|
||||
// }
|
||||
}
|
||||
numOfInitialKeywords = keywordsToQuery.length;
|
||||
FilterAndDisplay();
|
||||
@@ -196,25 +185,25 @@ function permuteResultsToQueue(retList, search){
|
||||
});
|
||||
|
||||
for (var i = 0; i < retList.length; i++) {
|
||||
var currents = CleanVal(retList[i]);
|
||||
if (!hashMapResults[currents]){
|
||||
hashMapResults[currents] = 1;
|
||||
var cleanKw = CleanVal(retList[i]);
|
||||
if (cleanKw.length && !hashMapResults[cleanKw]){
|
||||
hashMapResults[cleanKw] = 1;
|
||||
|
||||
// add base suggestion to queue
|
||||
if (currents!==search)
|
||||
keywordsToQuery[keywordsToQuery.length] = currents;
|
||||
if (cleanKw!==search)
|
||||
keywordsToQuery[keywordsToQuery.length] = cleanKw;
|
||||
|
||||
// add prefix permutations
|
||||
for (var k = 0; k < prefixes.length; k++) {
|
||||
var chr = prefixes[k];
|
||||
var currentx = chr + ' ' + currents;
|
||||
var currentx = chr + ' ' + cleanKw;
|
||||
keywordsToQuery[keywordsToQuery.length] = currentx;
|
||||
hashMapResults[currentx] = 1;
|
||||
}
|
||||
// add suffix permutations
|
||||
for (var j = 0; j < prefixes.length; j++) {
|
||||
var chr = prefixes[j];
|
||||
var currentx = currents + ' ' + chr;
|
||||
var currentx = cleanKw + ' ' + chr;
|
||||
keywordsToQuery[keywordsToQuery.length] = currentx;
|
||||
hashMapResults[currentx] = 1;
|
||||
}
|
||||
@@ -222,26 +211,58 @@ function permuteResultsToQueue(retList, search){
|
||||
}
|
||||
}
|
||||
|
||||
/** Display data from db upon pressing load button **/
|
||||
function loadFromDB(){
|
||||
var reqObj = db.transaction(["suggestions"],"readonly").
|
||||
objectStore("suggestions")
|
||||
.getAll()
|
||||
.onsuccess = function(e) {
|
||||
if (e.target.result.length){
|
||||
var retList = [];
|
||||
for (var i = 0; i < e.target.result.length; i++) {
|
||||
displayResults([e.target.result[i].keyword],e.target.result[i].search,false);
|
||||
}
|
||||
}
|
||||
table.draw(false);
|
||||
};
|
||||
reqObj.onerror=errorHandler;
|
||||
}
|
||||
|
||||
/** Display results **/
|
||||
function displayResults(retList, search){
|
||||
function displayResults(retList, search, dontDisplay){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (var i = 0; i < retList.length; i++) {
|
||||
var cleanKw = CleanVal(retList[i]);
|
||||
// display
|
||||
table.row.add([
|
||||
table.rows()[0].length,
|
||||
cleanKw,
|
||||
cleanKw.length,
|
||||
undefined,
|
||||
undefined,
|
||||
search]);
|
||||
}
|
||||
table.draw(false);
|
||||
|
||||
// FilterAndDisplay();
|
||||
//
|
||||
// var textarea = document.getElementById("input");
|
||||
// textarea.scrollTop = textarea.scrollHeight;
|
||||
//
|
||||
// we get an annoying popup alert if we add undefined values, catch them
|
||||
if (cleanKw===undefined||table.rows()[0].length===undefined||cleanKw.length===undefined,search===undefined){
|
||||
console.error('Undefined values',{
|
||||
id: table.rows()[0].length,
|
||||
keyword: cleanKw,
|
||||
length: cleanKw? cleanKw.length: undefined,
|
||||
search:search
|
||||
});
|
||||
continue;
|
||||
|
||||
} else if (cleanKw!==undefined && cleanKw.length){
|
||||
// Check if suggestion is already displayed before adding
|
||||
// var matches = table.data().filter(function(v){return v[1]===cleanKw && v[5]==search;}).count();
|
||||
// if (!matches)
|
||||
table.row.add([
|
||||
table.rows()[0].length,
|
||||
cleanKw,
|
||||
cleanKw.length,
|
||||
null,
|
||||
null,
|
||||
search]);
|
||||
}
|
||||
}
|
||||
if (!dontDisplay) table.draw(false);
|
||||
}
|
||||
|
||||
/** Store new results in db and hashmap **/
|
||||
@@ -249,22 +270,23 @@ function storeResults(retList, search, url){
|
||||
|
||||
for (var i = 0; i < retList.length; i++) {
|
||||
var cleanKw = CleanVal(retList[i]);
|
||||
if (cleanKw.length){
|
||||
// TODO check if I should add in bulk?
|
||||
|
||||
// TODO check if I should add in bulk?
|
||||
|
||||
// add to db
|
||||
var transaction = db.transaction(["suggestions"], "readwrite");
|
||||
transaction.onerror = errorHandler;
|
||||
var objectStore = transaction.objectStore("suggestions");
|
||||
addReq = objectStore.add({
|
||||
keyword: cleanKw,
|
||||
Length: cleanKw.length,
|
||||
search: search,
|
||||
ip: myIp,
|
||||
url: this.url,
|
||||
time: (new Date()).toUTCString()
|
||||
});
|
||||
addReq.onerror=errorHandler;
|
||||
// add to db
|
||||
var transaction = db.transaction(["suggestions"], "readwrite");
|
||||
transaction.onerror = errorHandler;
|
||||
var objectStore = transaction.objectStore("suggestions");
|
||||
addReq = objectStore.add({
|
||||
keyword: cleanKw,
|
||||
Length: cleanKw.length,
|
||||
search: search,
|
||||
ip: myIp,
|
||||
url: this.url,
|
||||
time: (new Date()).toUTCString()
|
||||
});
|
||||
addReq.onerror=errorHandler;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -304,6 +326,7 @@ function QueryKeyword(search) {
|
||||
}
|
||||
displayResults(retList,search);
|
||||
permuteResultsToQueue(retList);
|
||||
queryLock = false;
|
||||
}
|
||||
else {
|
||||
// search not done, lets do the query
|
||||
@@ -316,7 +339,7 @@ function QueryKeyword(search) {
|
||||
client: "chrome"
|
||||
},
|
||||
success: function (res, statusText, jqXHR) {
|
||||
var search = res[0];
|
||||
// var search = res[0];
|
||||
var retList = res[1];
|
||||
var char, currentx;
|
||||
|
||||
@@ -334,23 +357,28 @@ function QueryKeyword(search) {
|
||||
reqObj.onerror=errorHandler;
|
||||
}
|
||||
|
||||
/** Clean input, may not all be needed **/
|
||||
function CleanVal(input) {
|
||||
var val = input;
|
||||
val = val.replace("\\u003cb\\u003e", "");
|
||||
val = val.replace("\\u003c\\/b\\u003e", "");
|
||||
val = val.replace("\\u003c\\/b\\u003e", "");
|
||||
val = val.replace("\\u003cb\\u003e", "");
|
||||
val = val.replace("\\u003c\\/b\\u003e", "");
|
||||
val = val.replace("\\u003cb\\u003e", "");
|
||||
val = val.replace("\\u003cb\\u003e", "");
|
||||
val = val.replace("\\u003c\\/b\\u003e", "");
|
||||
val = val.replace("\\u0026amp;", "&");
|
||||
val = val.replace("\\u003cb\\u003e", "");
|
||||
val = val.replace("\\u0026", "");
|
||||
val = val.replace("\\u0026#39;", "'");
|
||||
val = val.replace("#39;", "'");
|
||||
val = val.replace("\\u003c\\/b\\u003e", "");
|
||||
val = val.replace("\\u2013", "2013");
|
||||
|
||||
// legacy
|
||||
// val = val.replace("<b>", "");
|
||||
// val = val.replace("</b>", "");
|
||||
// val = val.replace("</b>", "");
|
||||
// val = val.replace("<b>", "");
|
||||
// val = val.replace("</b>", "");
|
||||
// val = val.replace("<b>", "");
|
||||
// val = val.replace("<b>", "");
|
||||
// val = val.replace("</b>", "");
|
||||
// val = val.replace("&", "&");
|
||||
// val = val.replace("<b>", "");
|
||||
// val = val.replace("&", "");
|
||||
// val = val.replace("'", "'");
|
||||
// val = val.replace("#39;", "'");
|
||||
// val = val.replace("</b>", "");
|
||||
// val = val.replace("–", "2013");
|
||||
|
||||
// this removes navigation suggestions
|
||||
if (val.length > 4 && val.substring(0, 4) == "http") val = "";
|
||||
return val;
|
||||
}
|
||||
@@ -359,9 +387,9 @@ function CleanVal(input) {
|
||||
function Filter(listToFilter) {
|
||||
var retList = listToFilter;
|
||||
|
||||
if (document.getElementById("filter-positive").value.length > 0) {
|
||||
if ($("#filter-positive").val().length > 0) {
|
||||
var filteredList = [];
|
||||
var filterContains = document.getElementById("filter-positive").value.split("\n");
|
||||
var filterContains = $("#filter-positive").val().split("\n");
|
||||
for (var i = 0; i < retList.length; i++) {
|
||||
var currentKeyword = retList[i];
|
||||
var boolContainsKeyword = false;
|
||||
@@ -382,9 +410,9 @@ function Filter(listToFilter) {
|
||||
retList = filteredList;
|
||||
}
|
||||
|
||||
if (document.getElementById("filter-negative").value.length > 0) {
|
||||
if ($("#filter-negative").val().length > 0) {
|
||||
var filteredList = [];
|
||||
var filterContains = document.getElementById("filter-negative").value.split("\n");
|
||||
var filterContains = $("#filter-negative").val().split("\n");
|
||||
for (var i = 0; i < retList.length; i++) {
|
||||
var currentKeyword = retList[i];
|
||||
var boolCleanKeyword = true;
|
||||
@@ -416,14 +444,20 @@ function FilterAndDisplay() {
|
||||
sb += outputKeywords[i];
|
||||
sb += '\n';
|
||||
}
|
||||
document.getElementById("input").value = sb;
|
||||
document.getElementById("numofkeywords").innerHTML = '' + outputKeywords.length + ' : ' + keywordsToQuery.length;
|
||||
$("#input").val(sb);
|
||||
$("#numofkeywords").html('Queue:' + outputKeywords.length + ', Results: ' + table.data().length);
|
||||
}
|
||||
|
||||
/** read settings from webpage **/
|
||||
function readSettings(){
|
||||
|
||||
}
|
||||
// function readSettings(){
|
||||
// rateLimit = $('#service').val();
|
||||
// filterNegative = $('#filter-negative').val();
|
||||
// filterPositive = $('#filter-positive').val();
|
||||
// rateLimit = $('#rate-limit').val();
|
||||
// // input = $('#input').val();
|
||||
// prefixes = $('#prefixes').val();
|
||||
// suffixes = $('#suffixes').val();
|
||||
// }
|
||||
/** load settings from localStorage **/
|
||||
function loadSettings(){
|
||||
// TODO do table settings as well, e.g. column visibilitity
|
||||
@@ -454,11 +488,7 @@ function reset(){
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
loadSettings();
|
||||
|
||||
|
||||
|
||||
table = $('#outtable').DataTable({
|
||||
pageLength: 25,
|
||||
dom:
|
||||
@@ -491,7 +521,7 @@ $(document).ready(function () {
|
||||
"targets": 5,
|
||||
"visible": false,
|
||||
}],
|
||||
ordering: [[ 0, 'dec' ]],
|
||||
ordering: [[ 0, 'asc' ]],
|
||||
colReorder: {},
|
||||
stateSave: true
|
||||
});
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
@brand-danger: #D9230F;
|
||||
@brand-primary: #D9831F;
|
||||
@btn-primary-color: white;
|
||||
@btn-danger-color: white;
|
||||
.btn-primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user