Scholar: direct "My profile" shortcut
When you are logged in, adds a top-bar link that goes straight to your Scholar profile page.
Code to copy
// Add a direct "My profile" link in the top bar when logged in
(function () {
if (document.getElementById('jzSchProf')) { return; }
function mount() {
var host = document.querySelector('#gs_hdr_drw, #gs_hdr_act, #gs_top');
if (!host) { return; }
var loggedIn = document.querySelector('a[href*="SignOutOptions"], a[href*="logout"], #gs_hdr_drw a[href*="/citations?"]');
if (!loggedIn) { return; }
if (document.getElementById('jzSchProf')) { return; }
var a = document.createElement('a');
a.id = 'jzSchProf';
a.href = '/citations?hl=en&user=me';
a.textContent = 'My profile';
a.style.cssText = 'display:inline-block;margin:6px 10px;padding:6px 12px;background:#0a7c3a;color:#fff;font-size:13px;font-weight:700;text-decoration:none;border-radius:4px;';
host.appendChild(a);
}
mount();
new MutationObserver(function () {
clearTimeout(window.__jzSchProf);
window.__jzSchProf = setTimeout(mount, 400);
}).observe(document.body, { childList: true, subtree: true });
})();
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.