javascript:(function(){var style=document.createElement('style');style.innerHTML="*{font-family:Arial,sans-serif}.wi-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.8);z-index:10000;display:flex;justify-content:center;align-items:center}.wi-modal{position:relative;background:#f8f1ea;padding:20px;border-radius:10px;max-width:80%;max-height:80%;overflow:auto;color:#23345a;min-width:300px}.wi-logo{max-width:175px;margin-bottom:20px}.wi-header{margin-top:0;color:#23345a}.wi-description{margin:10px 0;color:#23345a}.wi-data-header{margin-top:20px;color:#23345a}.wi-data-description{margin-bottom:10px;color:#23345a}.wi-table{width:100%;border-collapse:collapse;color:#23345a;margin-top:10px}.wi-table th,.wi-table td{border-bottom:1px solid #ddd;padding:8px;text-align:left}.wi-empty-table{text-align:center;color:#23345a;padding:20px}.wi-tooltip{position:relative;display:inline-block;cursor:pointer;font-size:18px;margin-left:5px}.wi-tooltip .wi-tooltiptext{visibility:hidden;width:200px;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-100px;opacity:0;transition:opacity 0.3s;font-size:14px;line-height:1.4}.wi-tooltip:hover .wi-tooltiptext{visibility:visible;opacity:1}.wi-button{padding:5px 10px;background-color:#23345a;color:#f8f1ea;border:none;border-radius:8px;cursor:pointer;font-size:14px;margin:5px}.wi-button:hover{background-color:#1d2d4b}.wi-table-button{margin:0}.wi-table-button:hover{background-color:#1d2d4b}.wi-button-group{display:inline-block}.wi-close-button-top-right{position:absolute;top:15px;right:10px}.wi-footer{text-align:center;margin-top:20px;color:#23345a}.wi-footer a{color:#e95e63}.wi-form-field{margin-bottom:10px}.wi-form-field label{display:block;margin-bottom:5px;color:#23345a}.wi-form-field input,.wi-form-field select{width:100%;padding:8px;border:1px solid #ccc;border-radius:4px}@media (max-width:768px){.wi-modal{max-width:90%;padding:15px}}.wi-tabs{display:flex;border-bottom:1px solid #ddd;margin-bottom:20px}.wi-tab{padding:10px 15px;cursor:pointer;color:#23345a;border-bottom:3px solid transparent;transition:border-color 0.3s}.wi-tab:hover,.wi-tab-active{border-bottom:3px solid #23345a}";document.head.appendChild(style);function showModal(boldKeywords,query){var overlay=document.createElement('div');overlay.className='wi-modal-overlay';document.body.appendChild(overlay);var modal=document.createElement('div');modal.className='wi-modal';overlay.appendChild(modal);var logo=document.createElement('img');logo.src='https://writingincrease.com/wp-content/uploads/2024/04/Writing-Increase-Logo-with-Christopher-Morris.png';logo.className='wi-logo';modal.appendChild(logo);var closeButtonTop=document.createElement('button');closeButtonTop.innerText='✖';closeButtonTop.className='wi-close-button-top-right wi-button';closeButtonTop.onclick=function(){document.body.removeChild(overlay)};modal.appendChild(closeButtonTop);var title=document.createElement('h2');title.innerText='Copy Bolded KWs from SERP';title.className='wi-header';modal.appendChild(title);var description=document.createElement('p');description.innerText=%60Showing all bolded keywords in SERP for "${query}".%60;description.className='wi-description';modal.appendChild(description);var table=document.createElement('table');table.className='wi-table';modal.appendChild(table);var uniqueWords=Array.from(new Set(boldKeywords.map(word=>word.toLowerCase()))).filter(word=>word!==query.toLowerCase());uniqueWords.forEach(word=>{var row=table.insertRow();var checkCell=row.insertCell(0);var checkBox=document.createElement('input');checkBox.type='checkbox';checkBox.checked=true;checkCell.appendChild(checkBox);var cell=row.insertCell(1);cell.innerText=word;cell.className='wi-table-cell';var copyCell=row.insertCell(2);copyCell.className='wi-table-cell';var copyButton=document.createElement('button');copyButton.innerText='Copy';copyButton.className='wi-button wi-table-button';copyButton.onclick=function(){navigator.clipboard.writeText(word).then(()=>alert('Copied!'),err=>alert('Error: '+err))};copyCell.appendChild(copyButton)});var buttonContainer=document.createElement('div');buttonContainer.className='wi-button-group';modal.appendChild(buttonContainer);var copyAllButton=document.createElement('button');copyAllButton.innerText='Copy All';copyAllButton.className='wi-button';copyAllButton.onclick=function(){var allWords=Array.from(table.rows).filter(row=>row.cells[0].querySelector('input').checked).map(row=>row.cells[1].innerText).join('\n');navigator.clipboard.writeText(allWords).then(()=>alert('All copied!'),err=>alert('Error: '+err))};buttonContainer.appendChild(copyAllButton);var closeButtonBottom=document.createElement('button');closeButtonBottom.innerText='Close';closeButtonBottom.className='wi-button';closeButtonBottom.onclick=function(){document.body.removeChild(overlay)};buttonContainer.appendChild(closeButtonBottom);var footer=document.createElement('p');footer.className='wi-footer';footer.innerHTML='Created by Christopher Morris';modal.appendChild(footer);overlay.onclick=function(event){if(event.target===overlay){document.body.removeChild(overlay)}};document.addEventListener('keydown',function(event){if(event.key==='Escape'){document.body.removeChild(overlay)}})}var urlParams=new URLSearchParams(window.location.search);var query=urlParams.get('q')||'this search query';var boldTags=document.getElementsByTagName('em');var boldKeywords=[];for(var i=0;i0){showModal(boldKeywords,query)}else{alert('Rare! No Google Bolded Keywords found on this page.')}})();
Or use the other code
javascript:(function() { var extractedWords = []; document.querySelectorAll('b, em').forEach(function(el) { extractedWords.push(el.textContent); }); if (extractedWords.length > 0) { var formattedWords = extractedWords.join('\n'); var textArea = document.createElement('textarea'); textArea.value = formattedWords; textArea.style.position = 'fixed'; textArea.style.bottom = '10px'; textArea.style.left = '10px'; textArea.style.width = '300px'; textArea.style.height = '200px'; textArea.style.padding = '10px'; textArea.style.border = '1px solid #ccc'; textArea.style.borderRadius = '5px'; textArea.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.1)'; textArea.style.fontSize = '14px'; textArea.style.fontFamily = 'Arial, sans-serif'; textArea.style.backgroundColor = '#f9f9f9'; document.body.appendChild(textArea); textArea.focus(); textArea.select(); alert('Bold and italic words are ready to be copied. Press Ctrl+C to copy.'); } else { alert('No bold or italic words found.'); } })();