has been removed.
=== New features in 1.17 ===
+* (bug 10183) Users can now add personal styles and scripts to all skins via
+ User:<name>/common.css and /common.js (if user css/js is enabled)
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive without
$this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) );
} else {
$userpage = $wgUser->getUserPage();
- $scriptpage = Title::makeTitleSafe(
- NS_USER,
- $userpage->getDBkey() . '/' . $sk->getSkinName() . '.js'
- );
- if ( $scriptpage && $scriptpage->exists() ) {
- $userjs = Skin::makeUrl( $scriptpage->getPrefixedText(), 'action=raw&ctype=' . $wgJsMimeType );
- $this->addScriptFile( $userjs );
+ $names = array( 'common', $sk->getSkinName() );
+ foreach( $names as $name ) {
+ $scriptpage = Title::makeTitleSafe(
+ NS_USER,
+ $userpage->getDBkey() . '/' . $name . '.js'
+ );
+ if ( $scriptpage && $scriptpage->exists() ) {
+ $userjs = $scriptpage->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType );
+ $this->addScriptFile( $userjs );
+ }
}
}
}
// @FIXME: properly escape the cdata!
$out->addInlineStyle( $wgRequest->getText( 'wpTextbox1' ) );
} else {
- $out->addStyle( self::makeUrl(
- $this->userpage . '/' . $this->getSkinName() . '.css',
- 'action=raw&ctype=text/css' )
- );
+ $names = array( 'common', $this->getSkinName() );
+ foreach( $names as $name ) {
+ $out->addStyle( self::makeUrl(
+ $this->userpage . '/' . $name . '.css',
+ 'action=raw&ctype=text/css' )
+ );
+ }
}
}
*/
public function isValidCssJsSubpage() {
if ( $this->isCssJsSubpage() ) {
+ $name = $this->getSkinFromCssJsSubpage();
+ if ( $name == 'common' ) return true;
$skinNames = Skin::getSkinNames();
- return array_key_exists( $this->getSkinFromCssJsSubpage(), $skinNames );
+ return array_key_exists( $name, $skinNames );
} else {
return false;
}