Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

125 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SIR

SIR is an Image Renamer extension for Google Chrome and Mozilla Firefox.

codebeat badgeCII Best Practicespipeline statuscoverage reportGitHub Releases

Get it from the official stores here: 🦊 Firefox, 🏐 Chrome

Features

  • Customizable naming template
  • Option to bypass 'Save As…' dialog
  • Fetched Tags String preview & copy (with hotkeys!)
  • Pixiv thumbnail warning on save request
  • Pixiv, X (Twitter), Danbooru max quality promoter & navigation prompt on 'View Image…'
  • Automatic handling of long names & multiple artists collaboration

Description

SIR fetches data from popular image galleries, suggesting informative file names through the usual 'Save As…' dialog.

The naming template is customizable; by default it's set to:

{handle}@{OR} {ID} {name} {caption} {tags},

{handle} represents author's nickname (usually it's a part of the gallery link), {OR} is site abbreviation as follows below, {ID} is a platform-unique ID of the picture (if present), {name} is author's human-readable name (often it's not the same as handle!), {caption} is the image title as specified by the creator, {tags} is a string of tags, separated by spaces (in-tag spaces are replaced by underscores).

Additionally, the selected text can be passed on as well with {selection} string.

Supported siteOR ('origin')ID type
ArtstationAScase-sensitive alphanumeric
DeviantartDAnumeric
DrawfriendsDFnumeric
Hentai-FoundryHFnumeric
InstagramIGcase-sensitive alphanumeric with underscore
PixivPXnumeric
TumblrTUnone
X (Twitter)TWnone
MedicalWhiskeyMWnumeric
VidyArtVAnumeric
DanbooruDBnumeric
TODO: Kemono-PartyKP???
TODO: GumroadGR???

The resulting filename is compatible with 0xb8/WiseTagger#1 and can be further tweaked by specifying a custom template through the extension context menu.

Please note:

  • On some sites many or all identifiers could be missing (and thus cannot be fetched).
  • No Unique IDs are known for X (Twitter) and Tumblr. If you do happen to know how to decipher ids for these platforms, please contact me.

Technical details

Every time a new page from the listed domains is loaded, SIR adds to it a content script, which responds for pings from the extension. If the active tab has this script responding, context menu items would be enabled, allowing input.

By user request ("SIR Image Renamer""Download with tags"), content scripts parse the page and pass the info to renaming procedure. This procedure suggests the file downloader a name to save the file by. "Save As" dialogue is invoked depending on whether the Suppress 'Save As' option was selected. By default, the image is saved in your browser's default download directory.

In addition, it is possible to manually get the list of parsed tags by pressing Ctrl+Shift+1 or selecting "Get tags string" in the context menu.

One can see what info is discovered by SIR ("SIR Image Renamer""Highlight fetched tags?"): Example of tag highlighting

For currently shown image or video on Instagram, the extension first promotes it to maximum available quality and then removes (right-click preventing) obstructions. This enables proper behavior not only for SIR, but for all the regular context menu options too (including third-party extensions depending on context menus, ex. Image Search Options!).

When opening single images from twimg.com domain (Twitter hosting server), SIR will prompt you for navigation to their full-sized original counterparts. Additionally, on Pixiv invoking a menu from a thumbnail, queues the download of the full-resolution picture.

Installation

To install and run the latest (non stable) version of this extension, follow these steps:

  • clone (or download the repository and unpack the archive) and place Extension folder in known location
  • for Firefox, navigate to Debug Addons menu (about:debugging#/runtime/this-firefox or Menu→Addons→'Gear' Dropdown→Debug Addons) and click on Load Temporary Add-on…
  • for Chrome, navigate to Extensions menu (chrome://extensions/ or Menu→More tools→Extensions), enable the "Developer Mode" and click on Load Unpacked
  • proceed to the Extension folder, select either the folder itself (for Chrome) or the manifest.json file (for Firefox)

Stable releases are published through the official stores and can be found here:

Firefox: https://addons.mozilla.org/firefox/addon/sir_image_renamer/

Chromium: https://chrome.google.com/webstore/detail/sir-image-renamer/gmdcgijknjodfhggamchhhejamncbgmc

Recommendations

  • SIR is a self-sufficient extension, yet it works wonders in conjunction with WiseTagger.
  • Although a handy tool, it's not(yet?) a batch downloader. You still have to manually save each file.
  • Some authors include no tags whatsoever, others fill way too much useless general-sounding clutter, so if you're aiming for maximum resolution, please check and tweak the name before saving.
  • Overabundant tags can sometimes exceed the filename length limit, thus they will be trimmed to nearest space below 230 symbols.

Planned features (TODO)

  • Customizable template
  • 'Options' page (as page action) to tweak and store persistent user options
  • Download subfolder customization
  • Localisation (…s?)
  • Integration with Hydrus Network for stealing tags (maybe?)
  • Batch downloads (maybe?)

Known bugs

  • Twitter - when scrolling through the infinite view, unrelated tags are fetched (since SIR fetches tags from the whole visible area). Please save images from individual post page for now.
  • Chrome/Chromium-based browsers do not allow setting 'referer' header; thus, on Pixiv, it's not possible to download the image through context menu. Please use Get Tags StringSave As… in the meantime.

If you happen to enconuter an unlisted bug, please submit it through https://github.com/Brawlence/SIR/issues/new

Releases

Packages

Used by

Contributors

Languages