Skip to content

Instantly share code, notes, and snippets.

View rootxnaresh's full-sized avatar
:shipit:
Focusing

NARESH KUMAR rootxnaresh

:shipit:
Focusing
View GitHub Profile
@rootxnaresh
rootxnaresh / checkTitles.js
Created August 31, 2021 16:39 — forked from fedegomez/checkTitles.js
Checks if the title of the result in the SERP matches the title of the URL
javascript: (function (doc){var changed=0; function checkTitles(){console.log('jQuery version ', $.fn.jquery, ' loaded'); var position=1; var items=[]; var results=$('#rso .kp-blk .g, #rso .g[class="g"], #rso .srg .g').not('.kno-kp .g').find('div:first').find('a:first'); $('.title-changed, #CountTitlesChanged').remove(); results.each(function (){if (!$(this).parents('.related-question-pair').length){var parent=$(this).closest('.tF2Cxc').length > 0 ? $(this).closest('.tF2Cxc') : $(this).closest('li'); items.push([ position, $(this).find('h3').text(), encodeURI($(this).attr('href')), parent]); position++;}}); var numItems=1; cors_proxies=[ 'https://api.codetabs.com/v1/proxy?quest=', 'https://jsonp.afeld.me/?url=',]; items.forEach(item=>{$.ajax({url: cors_proxies[Math.floor(Math.random() * cors_proxies.length)] + item[2], success: function (data, status, xhr){title=$(data).filter('title').text(); var html='<div class="title-changed">'; if (title !=item[1]){html +='<span style="font-weight: bold;color: #ff6961;">
#include <iostream>
using namespace std;
class complex
{
public:
int x,y,z,i;
void input();
friend void output(complex);