Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7952865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:59:25+00:00 2026-06-04T02:59:25+00:00

For development purposes, I’d like to be able to easily load locally-stored scripts into

  • 0

For development purposes, I’d like to be able to easily load locally-stored scripts into the browser instead of having to copy-paste to the console.

Creating a new <script> element isn’t working, it gives a Not allowed to load local resource: file://.... error (in Chrome).

Also, creating a userscript won’t work–I’d have to re-install it every time I make an edit.

Is there an alternative way to easily load a local script via a bookmarklet/etc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:59:26+00:00Added an answer on June 4, 2026 at 2:59 am

    In Chrome, you can create an extension that holds all of the local files that you need to load. It will make your files accessible via chrome-extension://... instead of file://...

    Make a file named manifest.json in a new folder and fill it with:

    {
      "name": "File holder",
      "manifest_version": 2,
      "version": "1.0",
      "web_accessible_resources": ["test.js", "other.js", "yetanother.js"]
    }
    

    Then, put all the scripts you want to load in that new directory, and make sure they are included in the web_accessbile_reources manifest list. Load the extension by going to chrome://extensions, enabling Developer Mode, and selecting the new folder with Load unpacked extension....

    Now you can access all the files in your extension directory using chrome-extension://[app_id]/[file_name], where “app_id” is the hash listed for the extension on the chrome://extensions page. Note that because the protocols and hostnames differ from where you’ve doing your actual work (unless you decide to do all your development in the extension folder, which might be acceptable to you), the extension resources are cross-domain and can only be loaded via <script> tag.

    Now from the console, you can do:

    var s = document.createElement("script");
    s.src = "chrome-extension://aefigdoelbemgaedgkcjpcnilbgagpcn/test.js";
    document.body.appendChild(s);
    

    (Assuming your file is test.js and your app id is aefigdoelbemgaedgkcjpcnilbgagpcn.)

    It’s a quite bit to type, I know, but perhaps you can store the chrome-extension://[app_id] part as a shorthand variable?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So for development purposes, we had our folder structure for our website something like
I'd like to generate a certificate for development purposes, but I don't want to
I want to create an extremely simple web server for development purposes in Ruby
During development, I use this to load the latest jQuery: <script src=http://www.google.com/jsapi></script> <script type=text/javascript>
How do I sync all the code in the SVN repository (for development purposes)
This question is more for development purposes and would never be used for a
I'm trying to set up SSRS 2008 on my desktop machine for development purposes.
I have a SQL DB in MS SQL Server 2008 R2 For development purposes,
I'm writing a basic Django application. For testing / development purposes I'm trying to
I would like to use smart card based authentication on the Django development server,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.