Skip to content

Instantly share code, notes, and snippets.

@luislobo14rap
Created November 9, 2019 20:35
Show Gist options
  • Save luislobo14rap/a65e519e48883070a8beec498962ecbe to your computer and use it in GitHub Desktop.
Save luislobo14rap/a65e519e48883070a8beec498962ecbe to your computer and use it in GitHub Desktop.
cloudwards.js
// https://www.cloudwards.net/comparison/
$('.row.justify-content-center.cws_com__row').find('a').each(function(){
if( $(this).find('.img-fluid').length == 0 ){
$(this).addClass('title__');
}
});
all = [];
all2 = [];
index = -1;
$('.row.justify-content-center.cws_com__row.list').each(function(){
let column = [];
$(this).children().each(function(){
$(this).removeAttr('style');
let text = $(this).toSimpleText();
if( text.length == 0 ){
if( $(this).find('.fa-check-circle').length == 1){
column.push('sim');
};
if( $(this).find('.fa-minus-circle').length == 1){
column.push('não');
};
}else{
column.push(text);
};
all.push(column);
});
});
$('.row.justify-content-center.cws_com__row.list').each(function(){
index++;
all2.push( $('.title__').eq([index]).toSimpleText().replace('Visit ', '') );
});
all = _.uniq(all);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment