javascript - Get data from sites that needs authentication -


i'm trying make google chrome extension gets data other site, question is: can use javascript (or jquery) data sites needs authentication? i.e want data site after log using javascript.

i tried code, doesn't seem work!

$(document).ready(function(){  $("#form").submit(function(event) {     event.preventdefault();    var $form = $( ),       us= $form.find( 'input[name="user"]' ).val(),       pas= $form.find('input[name="pass"]').val(),       url = "http://reg.ppu.edu/";    $.ajaxsetup({      username:us,     password:pas    });   var posting = $.post( url, { email: us, pass: pas} );    posting.done(function( data ) {         $( "#result" ).append( data );   }); });  }); 

this site i'm trying data data from: http://reg.ppu.edu

this error get: uncaught evalerror: refused evaluate string javascript because 'unsafe-eval' not allowed source of script in following content security policy directive: "script-src 'self' chrome-extension-resource:".


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -