[ad_1]
[ad_2]
If you are a rank math user, it may help you. It does not save. But just replaces "focus keyword". You need to run it after clicking on pencil icon of "SEO Details"
// Find all tr elements with class "type-page"
const typePageRows = document.querySelectorAll('tr.type-page');
// Loop through each tr element
typePageRows.forEach(row => {
// Find the "row-title" link and get its text content
const rowTitleLink = row.querySelector('a.row-title');
if (rowTitleLink) {
// Get the link text, remove "—" characters, and trim
let linkText = rowTitleLink.textContent;
linkText = linkText.replace(/—/g, '').trim();
// Find the "rank-math-column-value" input and set its value
const rankMathInput = row.querySelector('input.rank-math-column-value');
if (rankMathInput && linkText) {
rankMathInput.value = linkText;
// Trigger an 'input' event to ensure any listeners are notified of the change
const event = new Event('input', { bubbles: true });
rankMathInput.dispatchEvent(event);
}
}
});
console.log('Script execution completed.');
